How do I delete a shell function?

末鹿安然 提交于 2019-12-17 17:27:14

问题


I have done this:

$ z() { echo 'hello world'; }

How do I get rid of it?


回答1:


unset -f z

Will unset the function named z. A couple people have answered with:

unset z

but if you have a function and a variable named z only the variable will be unset, not the function.



来源:https://stackoverflow.com/questions/245406/how-do-i-delete-a-shell-function

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