Improve help + self documentation in console PHP shell
Thoughts on this:
- Expand the "help" function:
help - brief help and lists the options below
help shell - general help for the pfSense shell
help playback - list of available playback tools
help commands - list of common shell commands
help examples - examples and common scenarios for the shell
- Add to each playback command, a way to call it and get an internal description, so that "help commands" can list what these do, not just their names. (Get array at start of shell, to avoid slowness if user repeatedly consults help)
- Move "help" and its text to a subfile, similar to the other custom shell commands in /etc/phpshellsessions. Also the core pfSsh.php file stops being cluttered with a long help text. "Just nicer that way".
I'm happy to do this (not difficult) if the core devs are okay with it.
As an aside, pfSsh.php contains an array
$shell_cmds but I can't find any place it's used in the file or anywhere else in the codebase. Does something need fixing, or is this just set up as an aide-memoir for shell users to use in their commands (and therefore needs mentioning in 'help'?)