Skip to content

Commit

Permalink
fix(command): fix shell completion bug which occurs when the conflict…
Browse files Browse the repository at this point in the history
…s option is defined without dashes
  • Loading branch information
c4spar committed Aug 30, 2020
1 parent 92c84ac commit 2dfa8b1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion command/completions/zsh-completions-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,10 @@ function _${replaceSpecialChars(path)}() {` +
excludedOptions: string[],
): string {
let excludedFlags = option.conflicts?.length
? [...excludedOptions, ...option.conflicts]
? [
...excludedOptions,
...option.conflicts.map((opt) => "--" + opt.replace(/^--/, "")),
]
: excludedOptions;
excludedFlags = option.collect ? excludedFlags : [
...excludedFlags,
Expand Down

0 comments on commit 2dfa8b1

Please sign in to comment.