From: Antono Vasiljev Date: Sun, 4 Mar 2012 19:58:53 +0000 (+0300) Subject: Install xterm title only for xterm X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=f3c6300e4dc14fbca5d34cf3ebc4409fdbff8d3b;p=common%2Fbash_it.git Install xterm title only for xterm --- diff --git a/plugins/available/xterm.plugins.bash b/plugins/available/xterm.plugins.bash index 94d4c33..3e4ac9e 100644 --- a/plugins/available/xterm.plugins.bash +++ b/plugins/available/xterm.plugins.bash @@ -3,6 +3,7 @@ set_xterm_title () { echo -ne "\e]0;$title\007" } + precmd () { set_xterm_title "${USER}@${HOSTNAME} `dirs -0` $PROMPTCHAR" } @@ -11,4 +12,6 @@ preexec () { set_xterm_title "$1 {`dirs -0`} (${USER}@${HOSTNAME})" } -preexec_install +case "$TERM" in + xterm*|rxvt*) preexec_install;; +esac