Improve help support for custom commands and aliases

Review Request #11552 — Created March 23, 2021 and submitted — Latest diff uploaded

Information

RBTools
master

Reviewers

rbtools supports adding custom commands by either
finding a corresponding executable on $PATH beginning with 'rbt-'
or by setting an alias.  However, these custom commands do
not appear when running 'rbt help'.  Also, getting command-specific
help does not work - neither 'rbt help new-command' nor
'rbt new-command --help'.

This change fixes both of these shortcomings.

Tested locally on my own ReviewBoard instance with both commands on $PATH and aliases. I saw both listed in rbt help. I also tested rbt help <cmd> and rbt <cmd> --help for both commands on $PATH and aliases, and usage (or the alias string) was printed as expected.

I did not run the automated rbtools test suite. \<excuses> It looked somewhat involved to get it set up (I'm a python newbie), and I wasn't sure whether the automated testing would actually hit my new code, anyway \</excuses>

Commits

Files