From 7332f12e14b704dfbdbf2eb16644093b1413e508 Mon Sep 17 00:00:00 2001 From: Artem Sapegin Date: Thu, 15 Nov 2012 16:30:35 +0400 Subject: [PATCH] Bash: fix terminal title. --- includes/bash_prompt.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/bash_prompt.bash b/includes/bash_prompt.bash index 22f302d..b0d2144 100644 --- a/includes/bash_prompt.bash +++ b/includes/bash_prompt.bash @@ -102,7 +102,7 @@ function prompt_command { # Terminal title TITLE=`basename ${PWDNAME}` - [ $SHLVL -gt 1 ] && TITLE="${TITLE} — ${HOSTNAME}" + [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ] && TITLE="${TITLE} — ${HOSTNAME}" echo -ne "\033]0;${TITLE}"; echo -ne "\007" }