Listing global commands in help

As much as possible, I would like the Bus Pirate to contain all it’s own documentation. Meaning every command is listed in the ‘help’ menu, and every command has usage and options well documented in the -h help menu.

Digging around now I notice we’ve kind of lost sync for global commands. Mode specific commands are registered in each mode and are automatically listed in help using those structs. However, global commands still need to be added to help manually.

The easiest thing I can see at the moment is adding an additional variable to _command_struct that is either null, or points to a translation string to show in an ‘other available commands’ heading. I’m going to add the missing commands manually now, it’s mostly scripting/macro stuff and deserves it’s own heading, but longer term it would be nice to have new stuff appear automatically without making changes all over the source.

2 Likes