Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] Add sketch of specifying option groups #486

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eaaltonen
Copy link

This proposal explores the idea of grouping related options to allow the CLI designer to more precisely determine which options make sense with given commands. This is particularly relevant for mid-to-large CLI utilities, such as rsync and git, for example.

Commit

The POSIX Utility argument syntax specifies a single OPTIONS section.
If there are options make sense only with some set of operands
(commands), then it currently seems to be required to list these for
each operand.

This example explores the potential of define multiple option groups,
which would hopefully help both the command line interface designer and
user to specify and select the correct options for each operand.

Signed-off-by: Eero Aaltonen eero.aaltonen@vaisala.com

Additional Notes:

This would change the current behavior of
"[options] can be expanded to any options listed in the "Options:" section"

to
"any option group listed in help message can be expanded to the options in that group". Of course the details of what is considered an option group would have to hashed out.

The POSIX Utility argument syntax specifies a single OPTIONS section.
If there are options make sense only with some set of operands
(commands), then it currently seems to be required to list these for
each operand.

This example explores the potential of define multiple option groups,
which would hopefully help both the command line interface designer and
user to specify and select the correct options for each operand.

Signed-off-by: Eero Aaltonen <eero.aaltonen@vaisala.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant