summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorLukas Elmer <lukas.elmer@gmail.com>2023-10-11 18:06:22 +0200
committerGitHub <noreply@github.com>2023-10-11 18:06:22 +0200
commitda3b8fcb6a6bcf4d440b9768d2deab27f787929a (patch)
tree36fa278f0604121a6e3ad7f8d923077cc25e2bf4 /plugins
parentb1821a24f0574488554de8e7f6d0735fb851de8b (diff)
downloadzsh-da3b8fcb6a6bcf4d440b9768d2deab27f787929a.tar.gz
zsh-da3b8fcb6a6bcf4d440b9768d2deab27f787929a.tar.bz2
zsh-da3b8fcb6a6bcf4d440b9768d2deab27f787929a.zip
fix(yarn): output completion entries in UTF-8 (#11955)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/yarn/_yarn2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/yarn/_yarn b/plugins/yarn/_yarn
index 1237ba672..f15756ff4 100644
--- a/plugins/yarn/_yarn
+++ b/plugins/yarn/_yarn
@@ -144,7 +144,7 @@ _yarn_scripts() {
fi
if [[ -n $packageJson ]]; then
- scripts=("${(@f)$(cat ${packageJson} | perl -0777 -MJSON::PP -n -E '%r=%{decode_json($_)->{scripts}}; do{$k=$_;($e=$k)=~s/:/\\:/g; printf "$e:$r{$k}\n"} for sort keys %r')}")
+ scripts=("${(@f)$(cat ${packageJson} | perl -0777 -MJSON::PP -n -E 'binmode(STDOUT, ":encoding(UTF-8)"); %r=%{decode_json($_)->{scripts}}; do{$k=$_;($e=$k)=~s/:/\\:/g; printf "$e:$r{$k}\n"} for sort keys %r')}")
fi
commands=('env' $scripts $binaries)