Unaliasing a global alias in zsh

夙愿已清 提交于 2020-01-23 07:51:16

问题


I had defined a global alias in my zsh shell using "alias -g" . When I am trying to unalias it, the shell throws the following error : "unalias: no such hash table element".

Any pointers on how to unalias a globally defined alias?


回答1:


You need to escape it while attempting to unalias. Try saying:

unalias \aliasname

instead of

unalias aliasname

Since it's a global alias, the shell would substitute it anywhere on the command line unless you escape it.



来源:https://stackoverflow.com/questions/19343973/unaliasing-a-global-alias-in-zsh

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