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

Mandatory arguments but in any order #479

Open
pihentagy opened this issue Jun 9, 2020 · 1 comment
Open

Mandatory arguments but in any order #479

pihentagy opened this issue Jun 9, 2020 · 1 comment

Comments

@pihentagy
Copy link

Having the following doc:

Usage:
  $0 encrypt -w <workload_name> <filename> -o <output_filename>
  $0 decrypt -w <workload_name> <filename> -o <output_filename>

I'd like to be able to use encrypt where the order of the options are arbitrary, but all the options are mandatory, so the following should do the same thing:

myprog encrypt -w workload input -o output
myprog encrypt -w workload -o output input

Does my definition not conforming to this or is the implementation buggy?

@TylerTemp
Copy link

try:

Usage:
  $0 encrypt [options] -w <workload_name> <filename> -o <output_filename>
  $0 decrypt [options] -w <workload_name> <filename> -o <output_filename>

Options:
  -w <workload_name>   note: in docopt option flag can only accept zero or one argument(s)
  -o <output_filename>

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

2 participants