added login shell flag for zsh as default shell

pull/496/head
keesh54 2024-01-08 17:28:22 +05:00
parent cff343cf9e
commit 3e9ccba39c
1 changed files with 2 additions and 1 deletions

View File

@ -109,7 +109,8 @@ tmux_socket() {
cache_tmux_default_command() {
local default_shell="$(get_tmux_option "default-shell" "")"
local opt=""
if [ "$(basename "$default_shell")" == "bash" ]; then
local available_shells=(zsh bash)
if [[ " ${available_shells[*]} " =~ " $(basename "$default_shell") " ]]; then
opt="-l "
fi
export TMUX_DEFAULT_COMMAND="$(get_tmux_option "default-command" "$opt$default_shell")"