GNU screen uses the value of "shell" for the $SHELL environment
variable. Having a non-absolute path there can cause issues. For
example, `ssh` uses $SHELL when running "Match exec" commands which fail
because it uses access() to verify if the shell exists.
ignorecase on
# I prefer zsh as my shell. GNU screen displays a warning if the shell isn't
-# available.
-shell zsh
+# available. Also used for $SHELL environment variable.
+shell ZSH
# Don't "login" windows (= add them to the utmp database) by default. Not
# useful for me and the "$" flag clutters the window flags (displayed with
fi
generate screenrc .in cat
+# Use absolute path for "shell" option for proper $SHELL variable.
+apply_optional_replacement screenrc \
+ zsh ZSH "`installed_path zsh`"
# As screen-256color is not widely supported use it only on machines where the
# matching terminfo entry is available. This also requires a terminal emulator
# which supports 256 colors. Also used for tmux.