List currently defined functions in dash?

試著忘記壹切 提交于 2020-01-02 08:19:11

问题


I'd like to list the currently defined functions in dash. Is there any way of doing that?

The closest I've been able to come up with is type which can be used to test if a function exist, but other than that I'm stumped.

P.S. I'm talking about dash here (not bash or zsh).


回答1:


Looking at exec.c it seems that no, there is none - the table is static, there's no such functionality in the file and none of the exported functions (unsetfunc etc) appear to offer the possibility of iterating, so unless I missed something I'd say you'll need to write a patch :)



来源:https://stackoverflow.com/questions/24868745/list-currently-defined-functions-in-dash

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