View shell function's current definition

So I am editing bashrc constantly, and I have a terminal open with a working function definition, although bashrc has been updated with a wrong function definition. (Because the definition do not change until I source the updated bashrc) How can I look up the working function definition in this case? For example, if I type:

alias function_name

I can see what the definition is for that alias. Is there a command similar for function? If not, is there a command to output entire bashrc that the current terminal is using?

Asked By: Forethinker

||
typeset -f function

displays the indicated function’s current definition.
It works in ksh (where it originated), bash and zsh. (n.b. in zsh, type -f, which, functions and whence -f also show the function definition.)

Answered By: Kevin
Categories: Answers Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.