diff options
author | Yurii Rashkovskii <[email protected]> | 2013-03-09 11:10:07 -0800 |
---|---|---|
committer | Yurii Rashkovskii <[email protected]> | 2013-03-09 11:10:07 -0800 |
commit | b2727a71506e1ccf1ba76b71c616d64f6c1ea659 (patch) | |
tree | 6adde2948be43b8f2a08005c9605b5fa8d0f7bc6 | |
parent | f2d5ef2917fcf5475943e3760dd1bccf4fb82b1c (diff) | |
parent | f4333961d2d0868248c1842b3bcf66ef30c6d1bf (diff) | |
download | kerl-b2727a71506e1ccf1ba76b71c616d64f6c1ea659.tar.gz kerl-b2727a71506e1ccf1ba76b71c616d64f6c1ea659.tar.bz2 kerl-b2727a71506e1ccf1ba76b71c616d64f6c1ea659.zip |
Merge pull request #41 from aboroska/master
Add possibility to show the name of the release before the prompt by setting the KERL_ENABLE_PROMPT env variable
-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 |