Derive: how to enable trailing_var_arg with derive #4334
-
I am creating a cli tool that works like this:
But CMD shouldn't have to be one argument like
But with derive I currently only have
TLDR: How do I allow an argument like |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
You'll have to make the field's type be |
Beta Was this translation helpful? Give feedback.
-
Works well with
|
Beta Was this translation helpful? Give feedback.
trailing_var_arg
exists in the derive. It might not show up by searching the derive reference but take a look at the documentation for raw Command attributesYou'll have to make the field's type be
Vec<String>
.