We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6717cf1 commit 67b74fbCopy full SHA for 67b74fb
clap_complete/src/engine/complete.rs
@@ -81,7 +81,7 @@ pub fn complete(
81
});
82
83
if let Some(opt) = opt {
84
- if opt.get_action().takes_values() && value.is_none() {
+ if opt.get_num_args().expect("built").takes_values() && value.is_none() {
85
next_state = ParseState::Opt((opt, 1));
86
};
87
} else if pos_allows_hyphen(current_cmd, pos_index) {
@@ -581,7 +581,10 @@ fn parse_shortflags<'c, 's>(
581
582
is_find.unwrap_or(false)
583
584
- if opt.map(|o| o.get_action().takes_values()).unwrap_or(false) {
+ if opt
585
+ .map(|o| o.get_num_args().expect("built").takes_values())
586
+ .unwrap_or(false)
587
+ {
588
takes_value_opt = opt;
589
break;
590
}
0 commit comments