1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-14 18:00:08 +00:00

fix(yarn): output completion entries in UTF-8 (#11955)

This commit is contained in:
Lukas Elmer 2023-10-11 18:06:22 +02:00 committed by GitHub
parent b1821a24f0
commit da3b8fcb6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -144,7 +144,7 @@ _yarn_scripts() {
fi fi
if [[ -n $packageJson ]]; then 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 fi
commands=('env' $scripts $binaries) commands=('env' $scripts $binaries)