diff options
author | Andras Boroska <[email protected]> | 2013-03-09 11:17:17 +0100 |
---|---|---|
committer | Andras Boroska <[email protected]> | 2013-03-09 19:38:12 +0100 |
commit | f4333961d2d0868248c1842b3bcf66ef30c6d1bf (patch) | |
tree | 6adde2948be43b8f2a08005c9605b5fa8d0f7bc6 | |
parent | f2d5ef2917fcf5475943e3760dd1bccf4fb82b1c (diff) | |
download | kerl-f4333961d2d0868248c1842b3bcf66ef30c6d1bf.tar.gz kerl-f4333961d2d0868248c1842b3bcf66ef30c6d1bf.tar.bz2 kerl-f4333961d2d0868248c1842b3bcf66ef30c6d1bf.zip |
Add possibility to show the name of the release before the prompt
-rwxr-xr-x | kerl | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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 |