I have this:
cd 31 /Users/alexamil/WebstormProjects/oresoftware/botch/botch-shell-overrides.sh
the above style output, is given by this command:
declare -F my_bash_func
How can I grab just the file name from that result? something like:
file=$(declare -F my_bash_func | grab_3rd_entry)
I have to use:
shopt -s extdebug
declare -F my_bash_func
shopt -u extdebug
but this doesn't work on MacOS:
shopt -s extdebug
declare -pf my_bash_func
shopt -u extdebug
the latter yields a weird error:
declare: my_bash_func: not found
but using declare -F can find the function, so not sure why the -pf option doesn't work.