I want to have an option that takes two arguments. I.e. would like to be able to use
$ ./foo --path "old" "new"
Or what I really want is:
$ ./foo --path "old" "new" --path "old" "new"
But I don't know how to do it? (In fact I fear that it might not be possible...)
What I don't want, but which is close
I know how to have a repeating option (see below), but that is really not what I want here.
#!/usr/bin/env python3
'''foo
Usage:
foo [--path ARG]...
Options:
--path=ARG Repeating option.
'''
import docopt
args = docopt.docopt(__doc__)
print(args)
Could be called with
$ ./foo --path "old" --path "new"