mirror of
https://github.com/spf13/cobra
synced 2024-11-24 14:47:12 +00:00
Wrap printf tab with quotes (#1665)
Without this, slightly older versions of zsh fail to correctly parse the output of the __complete command. Tested that with zsh 5.0.2 and zsh 5.8. Since this is just correctly quoting the output of a command, it shouldn't cause any compatibility issues.
This commit is contained in:
parent
9d15fe657a
commit
bf6cb5804d
1 changed files with 1 additions and 1 deletions
|
@ -171,7 +171,7 @@ _%[1]s()
|
||||||
# We first need to escape any : as part of the completion itself.
|
# We first need to escape any : as part of the completion itself.
|
||||||
comp=${comp//:/\\:}
|
comp=${comp//:/\\:}
|
||||||
|
|
||||||
local tab=$(printf '\t')
|
local tab="$(printf '\t')"
|
||||||
comp=${comp//$tab/:}
|
comp=${comp//$tab/:}
|
||||||
|
|
||||||
__%[1]s_debug "Adding completion: ${comp}"
|
__%[1]s_debug "Adding completion: ${comp}"
|
||||||
|
|
Loading…
Reference in a new issue