How to simultaneously set whitespace and comma as a value_delimiter
?
#6076
Unanswered
Andrew15-5
asked this question in
Q&A
Replies: 1 comment 3 replies
-
There is not a native way to do this today. Cargo does not use If you decide to make an issue, it would be helpful if you searched for any past discussions on this. It would help expedite things. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Right now, it seems that clap can parse
Vec<String>
flag as--flag a --flag b
and as--flag 'a b'
and--flag a,b
at least for this (idk how cargo parses-F
, maybe it handles both comma and space). But I don't understand how to makevalue_delimiter
use comma and whitespace to separate array items within one flag argument for custom types, or even forkey=value
arguments.I looked into
IntoResettable
, but didn't find any[&str]
orVec<&str>
, and I don't even know how to set&str
and what its behavior (e.g.,", "
). So far, I can explicitly set only one of thechar
s.I assume I can't, but somehow I can parse the raw argument into slice or something, so that clap then automatically will concatenate them into the vector.
Beta Was this translation helpful? Give feedback.
All reactions