Permalink
Browse files

Merge pull request #60 from jj1bdx/jj1bdx-active-path-fix

Update kerl to use $_KERL_ACTIVE_DIR for get_active_path
  • Loading branch information...
2 parents 69841de + 56035fd commit 9cf83c965f2318421f0f68c6328958ea0d846e48 @yrashk yrashk committed Jan 31, 2014
Showing with 7 additions and 2 deletions.
  1. +7 −2 kerl
View
9 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
}

0 comments on commit 9cf83c9

Please sign in to comment.