aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYurii Rashkovskii <[email protected]>2014-01-31 10:25:17 -0800
committerYurii Rashkovskii <[email protected]>2014-01-31 10:25:17 -0800
commit9cf83c965f2318421f0f68c6328958ea0d846e48 (patch)
tree23fc204404689964ed2db08c10c178750c21e2b6
parent69841dea4fadc95c4df51469104b8dbe9e51c862 (diff)
parent56035fd958f0284123c707145eaa32302227c988 (diff)
downloadkerl-9cf83c965f2318421f0f68c6328958ea0d846e48.tar.gz
kerl-9cf83c965f2318421f0f68c6328958ea0d846e48.tar.bz2
kerl-9cf83c965f2318421f0f68c6328958ea0d846e48.zip
Merge pull request #60 from jj1bdx/jj1bdx-active-path-fix
Update kerl to use $_KERL_ACTIVE_DIR for get_active_path
-rwxr-xr-xkerl9
1 files changed, 7 insertions, 2 deletions
diff --git a/kerl b/kerl
index dd3072d..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 "$_KERL_SAVED_PATH" ]; then
- echo $PATH | cut -d ":" -f 1 | sed 's/\(.*\)..../\1/'
+ if [ -n "$_KERL_ACTIVE_DIR" ]; then
+ echo $_KERL_ACTIVE_DIR
fi
return 0
}