-
Is it possible to catch trailing arguments such as
without adding some |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
Simple answer: it's easier to make them part of every command. You will have to consume them within a command but this doesn't mean they have to be a part of a command structure: in combinatoric mode you can make it so every command returns a tuple of a command result itself and a vector of trailing arguments. |
Beta Was this translation helpful? Give feedback.
-
Generally, a pair of I hoped defining a struct struct Command {
#[bpaf(external(sub_commands))]
subcommand: SubCommands,
#[bpaf(positional)]
var_args: Vec<String>,
} would allow that already since the help message says
|
Beta Was this translation helpful? Give feedback.
-
You can also try to mark your command parser as |
Beta Was this translation helpful? Give feedback.
You can also try to mark your command parser as
adjacent
https://pacak.github.io/bpaf/bpaf/trait.Parser.html#method.adjacent