Skip to content

Commit

Permalink
set path on load
Browse files Browse the repository at this point in the history
fixes #24
  • Loading branch information
caarlos0 committed Feb 21, 2015
1 parent 809a44d commit 47a0d55
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions jvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,16 @@ jvm() {
esac
}

if [ ! -z "$BASH" ]; then
PROMPT_COMMAND=_jvm-discover-and-set-version
elif [ ! -z "$ZSH_NAME" ]; then
chpwd() {
_jvm-discover-and-set-version
}
fi

main() {
_jvm-discover-and-set-version
if [ ! -z "$BASH" ]; then
PROMPT_COMMAND=_jvm-discover-and-set-version
elif [ ! -z "$ZSH_NAME" ]; then
chpwd() {
_jvm-discover-and-set-version
}
fi
}

main

0 comments on commit 47a0d55

Please sign in to comment.