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

Optional option argument #490

Open
tdegeus opened this issue Feb 19, 2021 · 0 comments
Open

Optional option argument #490

tdegeus opened this issue Feb 19, 2021 · 0 comments

Comments

@tdegeus
Copy link

tdegeus commented Feb 19, 2021

It work be great to support an optional option argument:

myprog
    Lorem ipsum.

Usage:
    myprog [options]

Options:
    -i, --input=[N]    Input file. (default: myname.txt)
    -h, --help         Show help.
          --version    Show version.

where the use case is

  • myprog -> no input file.
  • myprog -i -> an input file but with a default file-name (e.g. myname.txt, N.B. notice the braces and not square brackets).
  • myprog -i somename.txt -> an input file with a custom name
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

No branches or pull requests

1 participant