Skip to content

Commit

Permalink
fix(command) escape colons in subCommand name for zsh completions (#661)
Browse files Browse the repository at this point in the history
  • Loading branch information
DrakeTDL authored Sep 22, 2023
1 parent c91ddb6 commit aa1311f
Show file tree
Hide file tree
Showing 4 changed files with 174 additions and 33 deletions.
2 changes: 1 addition & 1 deletion command/completions/_zsh_completions_generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function _${replaceSpecialChars(path)}() {` +

let completions: string = commands
.map((subCommand: Command) =>
`'${subCommand.getName()}:${
`'${subCommand.getName().replace(/:/g, "\\:")}:${
subCommand.getShortDescription()
// escape single quotes
.replace(/'/g, "'\"'\"'")
Expand Down
Loading

0 comments on commit aa1311f

Please sign in to comment.