Skip to content

Commit

Permalink
fix(command) escape colons in Subcommand name for zsh shell completion
Browse files Browse the repository at this point in the history
  • Loading branch information
DrakeTDL committed Sep 16, 2023
1 parent c91ddb6 commit cd7cdd1
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit cd7cdd1

Please sign in to comment.