From 009a2a56a2bbd4e9cd84c042e028a42dabc40da4 Mon Sep 17 00:00:00 2001 From: Tuan Hiep Date: Sun, 1 Jun 2025 23:12:16 +0700 Subject: [PATCH] fix: fix default shell zsh --- scripts/restore.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/restore.sh b/scripts/restore.sh index 1a5e3f98..3645485c 100755 --- a/scripts/restore.sh +++ b/scripts/restore.sh @@ -109,8 +109,9 @@ tmux_socket() { cache_tmux_default_command() { local default_shell="$(get_tmux_option "default-shell" "")" local opt="" - if [ "$(basename "$default_shell")" == "bash" ]; then - opt="-l " + 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")" }