]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
zsh/rc: Use @:!hostname for remote root screens in window_preexec.
authorSimon Ruderich <simon@ruderich.org>
Mon, 21 Jun 2010 12:47:08 +0000 (14:47 +0200)
committerSimon Ruderich <simon@ruderich.org>
Mon, 21 Jun 2010 12:47:08 +0000 (14:47 +0200)
zsh/rc

diff --git a/zsh/rc b/zsh/rc
index 9dd47a49795fa36538169d996a331b5a3f7cc9aa..4620ef4ac62e6fc378426cac382598af970ad5b8 100644 (file)
--- 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 commands.
+            elif [[ $program_name == @!screen ]]; then
+                program_name="@:!${$(hostname)//.*/}"
             fi
         fi