diff options
author | Ting-Wei Lan <lantw44@gmail.com> | 2014-06-10 02:42:02 +0800 |
---|---|---|
committer | Ting-Wei Lan <lantw44@gmail.com> | 2014-06-10 02:42:02 +0800 |
commit | 2e2abd1361760c2037ec75f644cf75ef54943f7b (patch) | |
tree | 12b9eee671bdc0587ffbb770e4b41c300bdd7b70 | |
parent | b1d5d4d47783cdd471b4cc6eb7c46b3b4ba91761 (diff) | |
download | configfile-2e2abd1361760c2037ec75f644cf75ef54943f7b.tar.gz configfile-2e2abd1361760c2037ec75f644cf75ef54943f7b.tar.zst configfile-2e2abd1361760c2037ec75f644cf75ef54943f7b.zip |
bash_include: 在 PS1 顯示背景工作數量和 Android 提示bash_include-20140610
-rw-r--r-- | bash_include | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/bash_include b/bash_include index 67cea7e..261bb53 100644 --- a/bash_include +++ b/bash_include @@ -35,8 +35,8 @@ if [[ "$-" == *i* ]] ; then interactive_shell=1; fi # Internal Variables -colorprompting='\[\e[1;31m\]\!\[\e[m\] \[\e[35m\]$tty_short\[\e[m\][\[\e[1;33m\]\u\[\e[m\]@\[\e[1;32m\]\h\[\e[m\] \[\e[1;36m\]\w\[\e[m\]]' -nocolorprompting='\! $tty_short[\u@\h \w]' +colorprompting='\[\e[1;31m\]\!\[\e[m\] \[\e[35m\]$tty_short\[\e[m\][\[\e[1;33m\]\u\[\e[m\]@\[\e[1;32m\]\h\[\e[m\] \[\e[1;36m\]\w\[\e[m\]]\[\e[44;37m\] \j \[\e[m\]' +nocolorprompting='\! $tty_short[\u@\h \w] \j ' if [ "$SSH_CONNECTION" ] then @@ -44,16 +44,22 @@ then nocolorprompting="*$nocolorprompting" fi +if [ "$EPREFIX" ] +then + colorprompting="$colorprompting[\[\e[1;35m\]Prefix\[\e[m\]]" + nocolorprompting="$nocolorprompting[Prefix]" +fi + if [ "$UNDER_JHBUILD" = "true" ] || [ "$CERTIFIED_GNOMIE" = "yes" ] then colorprompting="$colorprompting[\[\e[1;35m\]JHBuild\[\e[m\]]" nocolorprompting="$nocolorprompting[JHBuild]" fi -if [ "$EPREFIX" ] +if [ "$ANDROID_BUILD_TOP" ] then - colorprompting="$colorprompting[\[\e[1;35m\]Prefix\[\e[m\]]" - nocolorprompting="$nocolorprompting[Prefix]" + colorprompting="$colorprompting[\[\e[1;35m\]Android\[\e[m\]]" + nocolorprompting="$nocolorprompting[Android]" fi if [ -f "$HOME/.bash_addps" ] |