I am looking for a solution like what is posted in the following question:
Get a list of function names in a shell script
But which works in a POSIX shell script. And if it is not possible, then at least something that works in dash.
I have the same scenario as him: I am making a help screen for a script whose first argument is a function and succeeding arguments are parameters of that function.
Since the script is under active development, I want the help screen to be automatically updated whenever I add a new "command" under the script.
Some functions are internal, and I solved that by putting a pattern in the function name if it is callable as a command from the script. Once I get the list of functions in my script it would be simple to grep out the ones containing that pattern so I can list them in the help screen.