mirror of
https://github.com/NaomiAmethyst/dots.git
synced 2025-04-13 09:30:06 +00:00
add support for a lot more terms and screen for bash's titles
This commit is contained in:
parent
38af1dbac9
commit
5633dbd71e
1 changed files with 8 additions and 2 deletions
|
@ -10,15 +10,21 @@ function do_prompt ()
|
|||
else
|
||||
BASE="#"
|
||||
fi
|
||||
|
||||
local TITLEBAR
|
||||
case $TERM in
|
||||
xterm*)
|
||||
xterm*|*rxvt*|cygwin|interix|Eterm|mlterm|kterm|aterm|putty*)
|
||||
TITLEBAR='\[\033]0;\u@\h:\w\007\]'
|
||||
;;
|
||||
screen*)
|
||||
TITLEBAR='\[\033k\033\134\033k\u@\h:\w\033\134\]'
|
||||
;;
|
||||
*)
|
||||
TITLEBAR=''
|
||||
;;
|
||||
esac
|
||||
export PS1="${TITLEBAR}\[\033[01;32m\]\u@\h \[\033[01;34m\]\w ${ERROR_PROMPT}${BASE} \[\033[00m\]"
|
||||
PS1="${TITLEBAR}\[\033[01;32m\]\u@\h \[\033[01;34m\]\w ${ERROR_PROMPT}${BASE} \[\033[00m\]"
|
||||
export PS1
|
||||
}
|
||||
|
||||
PROMPT_COMMAND=do_prompt
|
||||
|
|
Loading…
Add table
Reference in a new issue