Skip to content

Commit 620c440

Browse files
committed
update completion
1 parent 01f90fd commit 620c440

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

clap_complete/src/engine/complete.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ pub fn complete(
6969
(next_state, pos_index) =
7070
parse_positional(current_cmd, pos_index, is_escaped, current_state);
7171
} else if arg.is_escape() {
72+
if let ParseState::Opt((opt, count)) = current_state {
73+
if opt.is_allow_hyphen_values_set() && opt.is_allow_dash_dash_as_value_set() {
74+
next_state = parse_opt_value(opt, count);
75+
continue;
76+
}
77+
}
7278
is_escaped = true;
7379
} else if opt_allows_hyphen(&current_state, &arg) {
7480
match current_state {

0 commit comments

Comments
 (0)