.bashrc: PS1: Termux exception: +$SHELL; for local use.
authorJan Kratochvil <jan.kratochvil@redhat.com>
Sat, 18 Sep 2021 15:04:58 +0000 (17:04 +0200)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Sat, 18 Sep 2021 15:04:58 +0000 (17:04 +0200)
.bashrc

diff --git a/.bashrc b/.bashrc
index c93f47c..9328b48 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -198,7 +198,7 @@ if [ -n "$PS1" ];then       # set only in interactive sessions
                export PS1='[bash]${LOGNAME}@MOCK-'"`cat /MOCK`"':${PWD}# '
        fi
        export PS1='\[\017\]'"$PS1"     # \017=std charmap
-       if [ "${SSH_CLIENT#2a02:2b88:6:3b57::8f }" = "$SSH_CLIENT" ];then # !Termux
+       if [ "${SHELL#*/com.termux/}" = "$SHELL" -a "${SSH_CLIENT#2a02:2b88:6:3b57::8f }" = "$SSH_CLIENT" ];then
                export PS1='\[\033%G\]'"$PS1"   # \033%G=utf-8
        fi
        # Do not: kbd_mode -u # utf-8