Skip to content

Commit

Permalink
refactor: compgen assigned option with = suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
sigoden committed Apr 16, 2024
1 parent 76b5cfd commit 899da7e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/matcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,11 @@ impl<'a, 'b> Matcher<'a, 'b> {
};
for v in param.list_names() {
let nospace = param.prefixed() || param.assigned();
let v = if param.assigned() && v.len() > 2 {
format!("{v}=")
} else {
v
};
output.push((v, describe.to_string(), nospace, kind))
}
}
Expand Down
Binary file modified tests/snapshots/integration__compgen__option_assigned.snap
Binary file not shown.

0 comments on commit 899da7e

Please sign in to comment.