rbenv-whence requires a command argument

This commit is contained in:
Sam Stephenson 2011-08-03 00:06:23 -05:00
parent a62bd23ba2
commit 4668a2e2ed

View file

@ -18,5 +18,10 @@ whence() {
} }
RBENV_COMMAND="$1" RBENV_COMMAND="$1"
if [ -z "$RBENV_COMMAND" ]; then
echo "usage: rbenv whence [--path] COMMAND" >&2
exit 1
fi
result="$(whence "$RBENV_COMMAND")" result="$(whence "$RBENV_COMMAND")"
[ -n "$result" ] && echo "$result" [ -n "$result" ] && echo "$result"