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

假如想象 提交于 2019-12-03 07:02:25
Gilles 'SO- stop being evil'

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.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!