Zsh `which rvm` or `which gem` returns the function contents instead of the path -
i've never had problem before other machines reason in zsh whenever type
which gem
or
which rvm
i function contents:
gem () { local result command gem "$@" result="$?" hash -r return $result }
instead of it's path. life of me can not figure out why happening.
if switch on bash not have these problems.
this normal behavior zsh. which
built-in equivalent whence -c
, shows definitions of functions. use whence
, possibly combination of options not include -f
or -c
, if don't want this. example whence -w gem
display gem: function
. if want search external executables (and not aliases, built-ins, reserved words or functions), use whence -v
.
Comments
Post a Comment