Zsh `which rvm` or `which gem` returns the function contents instead of the path

前端 未结 1 692
再見小時候
再見小時候 2021-02-08 23:21

I\'ve never had this problem before with my other machines but for some reason in ZSH whenever I type

which gem

or

which rvm


        
相关标签:
1条回答
  • 2021-02-08 23:48

    This is normal behavior for zsh. The which built-in is equivalent to whence -c, which shows the definitions of functions. Use whence, possibly with a combination of options that does not include -f or -c, if you don't want this. For example whence -w gem will display gem: function. If you only want to search for external executables (and not aliases, built-ins, reserved words or functions), use whence -v.

    0 讨论(0)
提交回复
热议问题