From 8a98fea615668f3308e32cc2ee0e68c0f88ae9b0 Mon Sep 17 00:00:00 2001 From: PapaCharlie Date: Tue, 12 Apr 2022 20:05:30 -0700 Subject: [PATCH] Wrap printf tab with quotes 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. --- zsh_completions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zsh_completions.go b/zsh_completions.go index 624adab53..c6048a9e5 100644 --- a/zsh_completions.go +++ b/zsh_completions.go @@ -171,7 +171,7 @@ _%[1]s() # We first need to escape any : as part of the completion itself. comp=${comp//:/\\:} - local tab=$(printf '\t') + local tab="$(printf '\t')" comp=${comp//$tab/:} __%[1]s_debug "Adding completion: ${comp}"