Skip to content
Myr

Wrap printf tab with quotes (#1665)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

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.

authored by Paul Chesnais · committed by GitHub · parent 9d15fe6 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:zsh_completions.go+1 added-1 removed
169 unmodified lines
170 # For zsh's _describe, we need to use a : instead of a TAB.171 # We first need to escape any : as part of the completion itself.172 comp=${comp//:/\\:}173174 local tab=$(printf '\t')174 local tab="$(printf '\t')"175 comp=${comp//$tab/:}176177 __%[1]s_debug "Adding completion: ${comp}"178 completions+=${comp}
80 unmodified lines