We should look at the possibility of removing "usage" form ancillary_info. We would achieve this by implementing custom formatters for CLI usage and help. These custom formatters should be capable of providing the full context of what a command requires in order to be run. For example, calling geoips list currently results in the following output:
> geoips list
usage: To use, type `geoips list <sub-cmd> <sub-sub-cmd>`.
where the returned text is hard-coded into ancillary_info.
A custom usage formatter might traverse the command hierarchy to construct something that looks like this automatically by recognizing which levels only have non-executable commands, which have only executable commands, and which have a mixture.
geoips list requires additional arguments:
usage: `geoips list sub-cmd [sub-cmd]`
geoips get requires additional arguments:
usage: `geoips get sub-cmd [sub-cmd] [sub-cmd]`
Background and Motivation
Once implemented, we won't need to maintain a repository of usages and will be able to update how usage is printed in a single location.
Checklist for Completion
[ ] Research methods of implementing usage and help formatters to determine the best method.
Requested Update
Description
We should look at the possibility of removing "usage" form ancillary_info. We would achieve this by implementing custom formatters for CLI usage and help. These custom formatters should be capable of providing the full context of what a command requires in order to be run. For example, calling
geoips list
currently results in the following output:where the returned text is hard-coded into ancillary_info.
A custom usage formatter might traverse the command hierarchy to construct something that looks like this automatically by recognizing which levels only have non-executable commands, which have only executable commands, and which have a mixture.
Background and Motivation
Once implemented, we won't need to maintain a repository of usages and will be able to update how usage is printed in a single location.
Checklist for Completion