From: Paul Wassi Date: Thu, 23 Aug 2018 07:24:43 +0000 (+0200) Subject: base-files: provide more tolerant xterm detection X-Git-Tag: v19.07.0-rc1~2681 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1bd6b91e0f9f53f13b5a9fa2939674012fe7193f;p=oweals%2Fopenwrt.git 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 --- 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