Our ksh environment defines several functions. The names of these functions can be listed using then typeset -f
ksh command (or the functions
alias). Is it possible to see the definition (ie source code) for these functions?
This seems like an obvious question, but I've tried all manner of parameters to typeset -f
with no luck.
As an example (on Linux):
$ foo()
> {
> echo foo
> }
$ foo
foo
$ typeset -f foo
foo
$
For some (but not all) other functions defined by default in the environment, typeset -f
does show the source.
Update 1: This is happening with Linux kernel 2.4.21-32
Update 2: Update 2: Ctrl-V gives "Version M 1993-12-28 n+" - seems like this is quite an old version so might not have the fixes mentionned by Gilles below
Thanks, Steve