From 1160c1da711c47f5b9a3983433442569f3c9d22b Mon Sep 17 00:00:00 2001 From: "Helmut K. C. Tessarek" Date: Thu, 5 Dec 2019 18:50:41 -0500 Subject: [PATCH] only add -l when default_shell is bash --- scripts/restore.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/restore.sh b/scripts/restore.sh index 66b9f59..355ee9a 100755 --- a/scripts/restore.sh +++ b/scripts/restore.sh @@ -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() {