argh
argh copied to clipboard
Let parser name set the program name by default.
Just going through pending issues and pull requests; this one wasn't merged yet exclusively due to the lack of a pair of unit tests ('prog' defined / 'prog' not defined) and documentation (at least some notes about the motivation for the change).
As usual, I can figure out the motivation myself and write the tests, but it will take me much more time than just read the patch and click the "Merge" button.
So this PR is going to sit here for some time unless I suddenly get lots of free time or the author adds a unit test. ;)
Firstly, this PR can indeed be merged after writing a simple unit test. It merely uses the first mandatory arg of the EntryPoint
constructor as the default value for the program name in help.
Secondly, EntryPoint
doesn't look like core functionality of Argh, perhaps it should be moved into something like argh.contrib
/ argh.ext
.
It makes sense what you're saying -- it can be moved into an extension package.