Getting values multiple occurrences of group in order #4908
Unanswered
fabianfreyer
asked this question in
Q&A
Replies: 1 comment
-
For others, #2419 is where this conversation continued |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've got an
ArgGroup
that contains multiple values taking (optional) values, e.g.:Here, the group contains
["foo", "bar", "baz"]
, but notother-option
. Each can be specified multiple times, e.g.:Now, my goal is to get a list of all
(Id, Option<T>)
pairs that are part of this group, keeping order intact:I'm not quite sure how I can do this, since using
get_occurrences
on the group just gets me the Id's, (need to downcast to clap_builder::util::id::Id
), but that just gives me the Id's in order.I've tried the following, which doesn't completely work, since
get_occurrences
seems to skip thefoo
when no value is given, and it doesn't make use of the argument group, but relies on hard-coded ids. Furthermore, because of #2419, it seems to skip the index of--foo
where no argument is given.Beta Was this translation helpful? Give feedback.
All reactions