aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
diff options
context:
space:
mode:
authorPaul Wassi <p.wassi@gmx.at>2018-08-23 09:24:43 +0200
committerJo-Philipp Wich <jo@mein.io>2018-12-18 11:28:12 +0100
commit87a6aadfd558a8ea4477c85f55e617e5cc7e77ea (patch)
tree33b5b85d5c08248599bb2e3b3d16d1285b1acf24 /package/base-files
parent40ca437c325d6a88ff05033a7817bdfbf962e9a2 (diff)
downloadupstream-87a6aadfd558a8ea4477c85f55e617e5cc7e77ea.tar.gz
upstream-87a6aadfd558a8ea4477c85f55e617e5cc7e77ea.tar.bz2
upstream-87a6aadfd558a8ea4477c85f55e617e5cc7e77ea.zip
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> (backported from 1bd6b91e0f9f53f13b5a9fa2939674012fe7193f)
Diffstat (limited to 'package/base-files')
-rw-r--r--package/base-files/files/etc/profile6
1 files changed, 5 insertions, 1 deletions
diff --git a/package/base-files/files/etc/profile b/package/base-files/files/etc/profile
index e9936fb36a..9a3ac069a2 100644
--- a/package/base-files/files/etc/profile
+++ b/package/base-files/files/etc/profile
@@ -14,7 +14,11 @@ export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6)
export HOME=${HOME:-/root}
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 /usr/bin/vim ] && alias vi=vim || alias vim=vi