Fix for issue #108 that restores xterm plugin functionality on OS X.

This commit is contained in:
James Ratcliffe
2015-05-10 15:17:45 -04:00
parent 7f8e2c2de7
commit 66fd6411a0

View File

@@ -0,0 +1,20 @@
cite about-plugin
about-plugin 'automatically set your xterm title with host and location info'
set_xterm_title () {
local title="$1"
echo -ne "\033]0;$title\007"
}
precmd () {
set_xterm_title "${USER}@${HOSTNAME} `dirs -0` $PROMPTCHAR"
}
preexec () {
set_xterm_title "$1 {`dirs -0`} (${USER}@${HOSTNAME})"
}
case "$TERM" in
xterm*|rxvt*) preexec_install;;
esac