projects
/
config
/
bash_prompt.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
b7917bf
)
styles/iceg: show the gst-build branch in the prompt if GST_ENV is set
author
Antonio Ospite <ao2@ao2.it>
Thu, 28 Mar 2019 21:58:52 +0000
(22:58 +0100)
committer
Antonio Ospite <ao2@ao2.it>
Thu, 28 Mar 2019 21:58:52 +0000
(22:58 +0100)
styles/iceg
patch
|
blob
|
history
diff --git
a/styles/iceg
b/styles/iceg
index
a89c9dc
..
2a8d17a
100644
(file)
--- a/
styles/iceg
+++ b/
styles/iceg
@@
-15,6
+15,14
@@
PS1+="[${BOLD_WHITE}\#${BOLD_CYAN}]"
PS1+="${MODE_GRAPHIC}${HORIZ_LINE}${MODE_DEFAULT}"
PS1+="[${BOLD_RED}\${ERR}${BOLD_CYAN}]"
PS1+="${MODE_GRAPHIC}${HORIZ_LINE}${MODE_DEFAULT}"
PS1+="[${BOLD_RED}\${ERR}${BOLD_CYAN}]"
+# GST_ENV is set before the gst-build subshell starts and is valid until the
+# subshell exits, so it's OK to only check it once and for all when the prompt
+# is defined.
+if [[ -n "${GST_ENV}" ]];
+then
+ PS1+="${MODE_GRAPHIC}${HORIZ_LINE}${MODE_DEFAULT}[ ${BOLD_MAGENTA}${GST_ENV}${BOLD_CYAN} ]"
+fi
+
# VCSH_DIRECTORY is set before a vcsh subshell starts and is valid until the
# subshell exits, so it's OK to only check it once and for all when the prompt
# is defined.
# VCSH_DIRECTORY is set before a vcsh subshell starts and is valid until the
# subshell exits, so it's OK to only check it once and for all when the prompt
# is defined.