aboutsummaryrefslogtreecommitdiffstats
path: root/bash_include
diff options
context:
space:
mode:
authorTing-Wei Lan <lantw44@gmail.com>2014-06-16 16:07:10 +0800
committerTing-Wei Lan <lantw44@gmail.com>2014-06-16 16:07:10 +0800
commitc8524d0a67051f0d12df92db0e048ea8496f4a41 (patch)
treec7c3263b95de207be9e8fae2075561bd7c917a3f /bash_include
parent32fbac180dab5c0706553350525c20714999dbe7 (diff)
downloadconfigfile-c8524d0a67051f0d12df92db0e048ea8496f4a41.tar
configfile-c8524d0a67051f0d12df92db0e048ea8496f4a41.tar.gz
configfile-c8524d0a67051f0d12df92db0e048ea8496f4a41.tar.bz2
configfile-c8524d0a67051f0d12df92db0e048ea8496f4a41.tar.lz
configfile-c8524d0a67051f0d12df92db0e048ea8496f4a41.tar.xz
configfile-c8524d0a67051f0d12df92db0e048ea8496f4a41.tar.zst
configfile-c8524d0a67051f0d12df92db0e048ea8496f4a41.zip
bash_include: 在 PS1 顯示 Software Collections 環境狀態bash_include-20140616
Diffstat (limited to 'bash_include')
-rw-r--r--bash_include8
1 files changed, 8 insertions, 0 deletions
diff --git a/bash_include b/bash_include
index 261bb53..a662f7b 100644
--- a/bash_include
+++ b/bash_include
@@ -50,6 +50,14 @@ then
nocolorprompting="$nocolorprompting[Prefix]"
fi
+if [ "$X_SCLS" ]
+then
+ scl_enabled="`echo "$X_SCLS" | sed 's/ *$//' | tr ' ' ','`"
+ colorprompting="$colorprompting[\[\e[1;35m\]SCL:$scl_enabled\[\e[m\]]"
+ nocolorprompting="$nocolorprompting[SCL:$scl_enabled]"
+ unset scl_enabled
+fi
+
if [ "$UNDER_JHBUILD" = "true" ] || [ "$CERTIFIED_GNOMIE" = "yes" ]
then
colorprompting="$colorprompting[\[\e[1;35m\]JHBuild\[\e[m\]]"