aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
diff options
context:
space:
mode:
authorPaul Wassi <p.wassi@gmx.at>2018-08-23 09:24:43 +0200
committerJohn Crispin <john@phrozen.org>2018-08-29 08:33:54 +0200
commit1bd6b91e0f9f53f13b5a9fa2939674012fe7193f (patch)
tree6c613fa065497581b646d5bcea916713e2428a52 /package/base-files
parentfe960cead7005811deb03c220f6bb5660f65e1d5 (diff)
downloadupstream-1bd6b91e0f9f53f13b5a9fa2939674012fe7193f.tar.gz
upstream-1bd6b91e0f9f53f13b5a9fa2939674012fe7193f.tar.bz2
upstream-1bd6b91e0f9f53f13b5a9fa2939674012fe7193f.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>
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