summaryrefslogtreecommitdiff
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
parentfe960cead7005811deb03c220f6bb5660f65e1d5 (diff)
downloadmtk-20170518-1bd6b91e0f9f53f13b5a9fa2939674012fe7193f.zip
mtk-20170518-1bd6b91e0f9f53f13b5a9fa2939674012fe7193f.tar.gz
mtk-20170518-1bd6b91e0f9f53f13b5a9fa2939674012fe7193f.tar.bz2
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>
-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 e9936fb..9a3ac06 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