aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndras Boroska <[email protected]>2013-03-09 11:17:17 +0100
committerAndras Boroska <[email protected]>2013-03-09 19:38:12 +0100
commitf4333961d2d0868248c1842b3bcf66ef30c6d1bf (patch)
tree6adde2948be43b8f2a08005c9605b5fa8d0f7bc6
parentf2d5ef2917fcf5475943e3760dd1bccf4fb82b1c (diff)
downloadkerl-f4333961d2d0868248c1842b3bcf66ef30c6d1bf.tar.gz
kerl-f4333961d2d0868248c1842b3bcf66ef30c6d1bf.tar.bz2
kerl-f4333961d2d0868248c1842b3bcf66ef30c6d1bf.zip
Add possibility to show the name of the release before the prompt
-rwxr-xr-xkerl12
1 files changed, 12 insertions, 0 deletions
diff --git a/kerl b/kerl
index b4b2876..7af030f 100755
--- a/kerl
+++ b/kerl
@@ -422,6 +422,11 @@ kerl_deactivate()
export REBAR_PLT_DIR
unset _KERL_SAVED_REBAR_PLT_DIR
fi
+ if [ -n "\$_KERL_SAVED_PS1" ]; then
+ PS1="\$_KERL_SAVED_PS1"
+ export PS1
+ unset _KERL_SAVED_PS1
+ fi
if [ -n "\$BASH" -o -n "\$ZSH_VERSION" ]; then
hash -r
fi
@@ -442,6 +447,13 @@ MANPATH="$absdir/man:\$MANPATH"
export MANPATH
REBAR_PLT_DIR="$absdir"
export REBAR_PLT_DIR
+if [ -f "$KERL_CONFIG" ]; then . "$KERL_CONFIG"; fi
+if [ -n "\$KERL_ENABLE_PROMPT" ]; then
+ _KERL_SAVED_PS1="\$PS1"
+ export _KERL_SAVED_PS1
+ PS1="($1)\$PS1"
+ export PS1
+fi
if [ -n "\$BASH" -o -n "\$ZSH_VERSION" ]; then
hash -r
fi