aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenji Rikitake <[email protected]>2014-01-28 15:27:14 +0900
committerKenji Rikitake <[email protected]>2014-01-28 15:27:14 +0900
commit56035fd958f0284123c707145eaa32302227c988 (patch)
tree23fc204404689964ed2db08c10c178750c21e2b6
parent4142e67109738a9166501d21e14896ce42ba155a (diff)
downloadkerl-56035fd958f0284123c707145eaa32302227c988.tar.gz
kerl-56035fd958f0284123c707145eaa32302227c988.tar.bz2
kerl-56035fd958f0284123c707145eaa32302227c988.zip
Update kerl
* Define $_KERL_ACTIVE_DIR when activating * Use $_KERL_ACTIVE_DIR for `kerl status`
-rwxr-xr-xkerl9
1 files changed, 7 insertions, 2 deletions
diff --git a/kerl b/kerl
index bc346c0..012a02c 100755
--- a/kerl
+++ b/kerl
@@ -447,6 +447,9 @@ kerl_deactivate()
export REBAR_PLT_DIR
unset _KERL_SAVED_REBAR_PLT_DIR
fi
+ if [ -n "\$_KERL_ACTIVE_DIR" ]; then
+ unset _KERL_ACTIVE_DIR
+ fi
if [ -n "\$_KERL_SAVED_PS1" ]; then
PS1="\$_KERL_SAVED_PS1"
export PS1
@@ -471,6 +474,8 @@ MANPATH="\${_KERL_MANPATH_REMOVABLE}:\$MANPATH"
export MANPATH _KERL_MANPATH_REMOVABLE
REBAR_PLT_DIR="$absdir"
export REBAR_PLT_DIR
+_KERL_ACTIVE_DIR="$absdir"
+export _KERL_ACTIVE_DIR
if [ -f "$KERL_CONFIG" ]; then . "$KERL_CONFIG"; fi
if [ -n "\$KERL_ENABLE_PROMPT" ]; then
_KERL_SAVED_PS1="\$PS1"
@@ -645,8 +650,8 @@ update_usage()
get_active_path()
{
- if [ -n "$REBAR_PLT_DIR" ]; then
- echo $REBAR_PLT_DIR
+ if [ -n "$_KERL_ACTIVE_DIR" ]; then
+ echo $_KERL_ACTIVE_DIR
fi
return 0
}