argh icon indicating copy to clipboard operation
argh copied to clipboard

Let parser name set the program name by default.

Open solidsnack opened this issue 9 years ago • 1 comments

solidsnack avatar Aug 20 '15 23:08 solidsnack

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. ;)

neithere avatar May 11 '16 19:05 neithere

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.

neithere avatar Feb 08 '23 01:02 neithere

It makes sense what you're saying -- it can be moved into an extension package.

solidsnack avatar Feb 08 '23 05:02 solidsnack