Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a prototype to explore an alternative to #115. The idea here is that we change argh_derive to produce an implementation of a new
Help
trait, that has an associated constant that describes the trait. I've changed argh_derive to use this helper to produce the help string.There's a couple things I'm not crazy about:
Help
trait at the same time asFromArgs
traits.argh::CommandInfo
is made somewhat, but not completely, redundant. We could merge the two together at the cost of a breaking api change, but that might be worth it.omit_usage
attribute #75, Manually print usage #56, Expose HelpMessage and allow for custom help switches #53, Allow positional arguments to be omitted from the help text #73, and etc.examples
andnotes
, but the old help allowed forcommand_name
substitution, so I used a closure to prepare those strings.cc @claywilkinson and @richkadel