From: martin f. krafft Date: Mon, 5 May 2008 11:59:17 +0000 (+0100) Subject: only set flags for ssh connections X-Git-Url: https://git.madduck.net/etc/zsh.git/commitdiff_plain/c56c70e6352411c54bcb70e15ccfcf16999b0de9?ds=inline only set flags for ssh connections --- diff --git a/.zsh/xterm-title b/.zsh/xterm-title index 07755a6..631c651 100644 --- a/.zsh/xterm-title +++ b/.zsh/xterm-title @@ -23,10 +23,11 @@ __set_xterm_title() { } __get_session_flags() { - local flags; flags= - [ -n "$DISPLAY" ] && flags="${flags}x" - [ -n "$SSH_AUTH_SOCK" ] && flags="${flags}a" - [ -n "$flags" ] && echo "[${flags}]" + [ -n "$SSH_CONNECTION" ] || return + local flags; flags= + [ -n "$DISPLAY" ] && flags="${flags}x" + [ -n "$SSH_AUTH_SOCK" ] && flags="${flags}a" + [ -n "$flags" ] && echo "[${flags}]" } __get_standard_prompt() {