Skip to content

Commit 9187f8b

Browse files
committed
Fix #94 start default-shell as login shell.
If pane content is restored and no default-command is set, restore.sh falls back to default-shell, which tmux sets automatically and calls as a login shell. In pane_creation_command() we need to make sure to call default-shell as a login shell. As tmux does. But take care not to call default-command as a login shell.
1 parent b020b24 commit 9187f8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/restore.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ 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" "$default_shell")"
103+
export TMUX_DEFAULT_COMMAND="$(get_tmux_option "default-command" "-l $default_shell")"
104104
}
105105

106106
tmux_default_command() {

0 commit comments

Comments
 (0)