X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=zsh%2Frc;h=5e97beaab4604277f660124c9c5499c3e5e50689;hb=bfb34890215fb6e326e9e7beed5439c3b5a3b72e;hp=9dd47a49795fa36538169d996a331b5a3f7cc9aa;hpb=056def611aff9eb03503133c9e7a84efb9218355;p=config%2Fdotfiles.git diff --git a/zsh/rc b/zsh/rc index 9dd47a4..5e97bea 100644 --- a/zsh/rc +++ b/zsh/rc @@ -373,6 +373,9 @@ if [[ $TERM == screen* || $TERM == xterm* || $TERM == rxvt* ]]; then # in the term/outer screen. if [[ $program_name == @screen ]]; then program_name="@:${$(hostname)//.*/}" + # Use "@:!hostname" for root screens. + elif [[ $program_name == @!screen ]]; then + program_name="@:!${$(hostname)//.*/}" fi fi @@ -425,6 +428,10 @@ if [[ $TERM == screen* || $TERM == xterm* || $TERM == rxvt* ]]; then # 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