# in the term/outer screen.
if [[ $program_name == @screen ]]; then
program_name="@:${$(hostname)//.*/}"
- # Use "@:!hostname" for root commands.
+ # Use "@:!hostname" for root screens.
elif [[ $program_name == @!screen ]]; then
program_name="@:!${$(hostname)//.*/}"
fi
# Add the preexec() and precmd() hooks.
add-zsh-hook preexec window_preexec
add-zsh-hook precmd window_precmd
+else
+ # Fallback if another TERM is used, necessary to run screen (see below in
+ # "RUN COMMANDS").
+ window_preexec() { }
fi