How do I list the functions defined in my shell?

后端 未结 8 2004
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-12 09:14

I can type alias to show a list of all the aliases.

But for functions, all I can do is grep my .bash_profile.

That only gets the ones in that fi

相关标签:
8条回答
  • 2020-12-12 10:01
    declare -F
    

    will give you the names of all functions

    type function_name
    

    will give you the source for a particular function

    0 讨论(0)
  • 2020-12-12 10:04

    Assuming bash shell:

    typeset -f
    

    will list the functions.

    typeset -F
    

    will list just the function names.

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