docopt.go icon indicating copy to clipboard operation
docopt.go copied to clipboard

Array values duplicated with OneOrMore options (...)

Open ps78674 opened this issue 5 years ago • 1 comments

The following usage

Usage:
  %[1]s [-u <URL>...] (-D <DOMAINFILE> [-V <VOLUMEFILE> -p <STORAGEPOOL> --start])
  %[1]s [-u <URL>...] (-V <VOLUMEFILE> [-p <STORAGEPOOL>])
  %[1]s [-u <URL>...] (--domdata <DOMAINDATA> [--voldata <VOLUMEDATA> -p <STORAGEPOOL>] --start)
  %[1]s [-u <URL>...] (--voldata <VOLUMEDATA> [-p <STORAGEPOOL>])
  %[1]s [-u <URL>...] (-R <DOMAINNAME>)

Options:
  -u, --url <URL>            server url [default: qemu:///system]
*******

with cli opts -u qemu+ssh://user@hostname/system -u test produces array with duplicated 2-nd value: [qemu+ssh://user@hostname/system test test test test test]

ps78674 avatar Jan 25 '21 09:01 ps78674

Hello, very interesting. Could you explain what introduced the duplication? I suppose it's related to multiple line of usage linked with the options definition.

Very nice catch. I also tested on line

Docopt online

Bug here too.

Sylvain303 avatar Apr 29 '22 07:04 Sylvain303