Fix for issue #108 that restores xterm plugin functionality on OS X.
This commit is contained in:
20
plugins/available/xterm.plugin.bash
Normal file
20
plugins/available/xterm.plugin.bash
Normal 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
|
||||
Reference in New Issue
Block a user