base-files: provide more tolerant xterm detection

Set the window title not only in "xterm", but also in
e.g. "xterm-256color", "xterm-color", etc.
The case statement is taken from Debian / Ubuntu.

Signed-off-by: Paul Wassi <p.wassi@gmx.at>
This commit is contained in:
Paul Wassi 2018-08-23 09:24:43 +02:00 committed by John Crispin
parent fe960cead7
commit 1bd6b91e0f

View file

@ -14,7 +14,11 @@ export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6)
export HOME=${HOME:-/root} export HOME=${HOME:-/root}
export PS1='\u@\h:\w\$ ' export PS1='\u@\h:\w\$ '
[ "$TERM" = "xterm" ] && export PS1='\[\e]0;\u@\h: \w\a\]'$PS1 case "$TERM" in
xterm*|rxvt*)
export PS1='\[\e]0;\u@\h: \w\a\]'$PS1
;;
esac
[ -x /bin/more ] || alias more=less [ -x /bin/more ] || alias more=less
[ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi [ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi