xterm.plugin.bash: reformat to follow bash-it code style

pull/949/head
Álvaro Brey 2017-04-26 18:46:24 +02:00
parent 597285cdfd
commit 9435a68695
No known key found for this signature in database
GPG Key ID: CFE28F23E51968FA
1 changed files with 6 additions and 6 deletions

View File

@ -2,12 +2,12 @@ cite about-plugin
about-plugin 'automatically set your xterm title with host and location info'
short_dirname () {
_short-dirname () {
local dir_name=`dirs -0`
[ "$SHORT_TERM_LINE" = true ] && [ ${#dir_name} -gt 8 ] && echo ${dir_name##*/} || echo $dir_name
}
short_command () {
_short-command () {
local input_command="$@"
[ "$SHORT_TERM_LINE" = true ] && [ ${#input_command} -gt 8 ] && echo ${input_command%% *} || echo $input_command
}
@ -18,11 +18,11 @@ set_xterm_title () {
}
precmd () {
set_xterm_title "${SHORT_USER:-${USER}}@${SHORT_HOSTNAME:-${HOSTNAME}} `short_dirname` $PROMPTCHAR"
set_xterm_title "${SHORT_USER:-${USER}}@${SHORT_HOSTNAME:-${HOSTNAME}} `_short-dirname` $PROMPTCHAR"
}
preexec () {
set_xterm_title "$(short_command $1) {`short_dirname`} (${SHORT_USER:-${USER}}@${SHORT_HOSTNAME:-${HOSTNAME}})"
set_xterm_title "`_short-command $1` {`_short-dirname`} (${SHORT_USER:-${USER}}@${SHORT_HOSTNAME:-${HOSTNAME}})"
}
case "$TERM" in