Repository: rsteube/carapace (go)

Issue:
zsh: zstyle list-colors
- `compadd`: ansi escape sequences are stripped
- `compadd -l`: ansi escape sequences work 
- `export ZSH_COLOR=${style}`: does not work
- `export ZSH_COLOUR=${style}`: does work, but only if no default `list-colors` is set with `zstyle`
- `zstyle ':completion:*' list-style '${style}`: works, but values are only highlighted after second `<tab>` and changes the default
- `zstyle ":completion:*:*:example:*" list-colors "${style}"`: does not work
- `zstyle ":completion:${curcontext}:*" list-colors "${style}"`: does not work

Pull request description:
zsh: fix zstyle curcontext
fix #482

Patch:
diff --git a/internal/shell/zsh/snippet.go b/internal/shell/zsh/snippet.go
index 3cf7a0c..1ef4e45 100644
--- a/internal/shell/zsh/snippet.go
+++ b/internal/shell/zsh/snippet.go
@@ -26,7 +26,8 @@ function _%v_completion {
     local lines=($(echo ${words} | sed 's/$/"/' | CARAPACE_ZSH_HASH_DIRS="$(hash -d)" xargs %v _carapace zsh))
   fi
 
-  export ZLS_COLOURS="${lines[1]}"
+  zstyle ":completion:${curcontext}:*" list-colors "${lines[1]}":
+
   local line_break=$'\n'
   [[ ! "${lines[2]}" == "NONE" ]] && _message -r "${lines[2]//$'\t'/${line_break}}"
   


Test patch:
diff --git a/example/cmd/_test/zsh.sh b/example/cmd/_test/zsh.sh
index c94c1cd..8188e35 100644
--- a/example/cmd/_test/zsh.sh
+++ b/example/cmd/_test/zsh.sh
@@ -14,7 +14,8 @@ function _example_completion {
     local lines=($(echo ${words} | sed 's/$/"/' | CARAPACE_ZSH_HASH_DIRS="$(hash -d)" xargs example _carapace zsh))
   fi
 
-  export ZLS_COLOURS="${lines[1]}"
+  zstyle ":completion:${curcontext}:*" list-colors "${lines[1]}":
+
   local line_break=$'\n'
   [[ ! "${lines[2]}" == "NONE" ]] && _message -r "${lines[2]//$'\t'/${line_break}}"