Closed sinewalker closed 6 years ago
Also the whence
alias should become a function that can do something similar, perhaps replacing my describe
function.
declare -F somefunc|awk '{print "Function: " $1 " in " $3 " line " $2}'
(requires shopt -s extdebug
to show file and line details, which extends startup time of dotfiles)
describe somefunc; type -a somefunc|tail +2
will show where a function is defined and then list the definition. Perhaps a function list
for this, rather than replace whence
which is more general as it's just an alias for type -a
Following commits close this Issue:
The
function
keyword should be similar to thealias
keyword and list functions. But it doesn't.I would like a
functions
or similar that can list the declared functions, excluding those beginning with an underscore (perhaps a switch--all
to include those).Something based around something like
declare -F|awk '!/declare -f _/{print $3}'
or just
declare -F|awk '{print $3}'
for--all
functions