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

Improve documentation for the CLI spec #50

Open
roman opened this issue Jul 6, 2018 · 0 comments
Open

Improve documentation for the CLI spec #50

roman opened this issue Jul 6, 2018 · 0 comments

Comments

@roman
Copy link
Owner

roman commented Jul 6, 2018

For the input value, use something similar to this example:

With my-app --foo the --foo is an input of type switch (from what I gather, it does not have a value associated to the flag), and it translates to a Boolean in the end (was --foo specified?)

With my-app --foo bar the --foo is an input of type option

With my-app bar, the input is of type argument as it is a positional argument

I think there is a limitation in regards on how the positional arguments order is decided (right now it could be rather arbitrary)

For the metavar, use something similar to this:

The metavar value is to change the name of an input in the --help message, when you do a --help and you have a command with option --option that has a metavar with METAVAR_VALUE_IS_THIS it will display a message somewhat like:

program header - some header description

--option METAVAR_VALUE_IS_THIS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant