max-au/argparse

Feature Request: custom format spec in help text

Closed this issue · 3 comments

By default, a long flag named foobar will generate the following text in the command usage section: [--foobar <foobar>]. It would be nice to be able to specify a custom format text so it could be changed to [--foobar <baz>].

It actually generates the name in <...> using atom identifier of the argument. Therefore, you can achieve the desired effect with

#{name => baz, long => "foobar"}

I am working on (initially planned but didn't included in the original release) templating schema for help/usage, which will enable more cusomisations (including re-positioning of help message).