Skip to content

Commit

Permalink
added jvm local
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Feb 21, 2015
1 parent c0338f2 commit 1b595f7
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions jvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,21 @@ _jvm-discover-and-set() {
[ ! -z "$version" ] && _jvm_set-java-path "$version"
}

jvm() {
if [ "$#" != 0 ]; then
local command="$1"; shift
fi
case "$command" in
local)
echo "$@" > .java-version
;;
*)
echo "Usage: jvm (local) <args>"
return 0
;;
esac
}

if [ ! -z "$BASH" ]; then
PROMPT_COMMAND=_jvm-discover-and-set
elif [ ! -z "$ZSH_NAME" ]; then
Expand Down

0 comments on commit 1b595f7

Please sign in to comment.