standardize plugins, update metadata
add about-plugin metadata chmod -x plugins cleanup filenames to standardize on x.plugin.bash format only plugin files intended to be executable from the command line should contain a shebang line, and should be a+x.
This commit is contained in:
28
plugins/available/_xterm.plugin.bash
Normal file
28
plugins/available/_xterm.plugin.bash
Normal file
@@ -0,0 +1,28 @@
|
||||
# This plugin is known to cause issues on OS X with the evaluation of
|
||||
# colors. Please read [issue 108] for more information.
|
||||
#
|
||||
# You can manually turn this on by symlinking it into your
|
||||
# plugins/enabled/ directory.
|
||||
#
|
||||
# [issue 108]: https://github.com/revans/bash-it/issues/108
|
||||
|
||||
cite about-plugin
|
||||
about-plugin 'automatically set your xterm title with host and location info'
|
||||
|
||||
set_xterm_title () {
|
||||
local title="$1"
|
||||
echo -ne "\e]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