Closed parasyte closed 4 months ago
As of now, Vec is reserved for positional arguments, but I want to change that limitation to allow Vec to collect multi-value args. For instance, I have a use case where I want zero or more paths to be specified, like this:
Vec
$ cli --input-path ./foo/bar --input-path ./baz --input-path /tmp/hello.txt
... which will parse to:
struct Args { input_path: Vec<PathBuf>, }
// dbg!(args); args = Args { input_path: ["./foo/bar", "./baz", "/tmp/hello.txt"], }
To do this, I will probably change positional args to require a new attribute on a Vec. This is a breaking change.
As of now,
Vec
is reserved for positional arguments, but I want to change that limitation to allowVec
to collect multi-value args. For instance, I have a use case where I want zero or more paths to be specified, like this:... which will parse to:
To do this, I will probably change positional args to require a new attribute on a
Vec
. This is a breaking change.