Skip to content

Commit

Permalink
only add -l when default_shell is bash
Browse files Browse the repository at this point in the history
  • Loading branch information
tessus authored and bruno- committed Dec 6, 2019
1 parent c66b791 commit 1160c1d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/restore.sh
Expand Up @@ -100,7 +100,11 @@ tmux_socket() {
# tmux server each time.
cache_tmux_default_command() {
local default_shell="$(get_tmux_option "default-shell" "")"
export TMUX_DEFAULT_COMMAND="$(get_tmux_option "default-command" "-l $default_shell")"
local opt=""
if [ "$(basename "$default_shell")" == "bash" ]; then
opt="-l "
fi
export TMUX_DEFAULT_COMMAND="$(get_tmux_option "default-command" "$opt$default_shell")"
}

tmux_default_command() {
Expand Down

0 comments on commit 1160c1d

Please sign in to comment.