Skip to content

Commit 1160c1d

Browse files
tessusbruno-
authored andcommitted
only add -l when default_shell is bash
1 parent c66b791 commit 1160c1d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/restore.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,11 @@ tmux_socket() {
100100
# tmux server each time.
101101
cache_tmux_default_command() {
102102
local default_shell="$(get_tmux_option "default-shell" "")"
103-
export TMUX_DEFAULT_COMMAND="$(get_tmux_option "default-command" "-l $default_shell")"
103+
local opt=""
104+
if [ "$(basename "$default_shell")" == "bash" ]; then
105+
opt="-l "
106+
fi
107+
export TMUX_DEFAULT_COMMAND="$(get_tmux_option "default-command" "$opt$default_shell")"
104108
}
105109

106110
tmux_default_command() {

0 commit comments

Comments
 (0)