mirror of
https://github.com/zsh-users/zsh-completions.git
synced 2026-09-17 16:00:19 +00:00
Fix perl one liner bug
decode_json returns hash reference, so scalar variable should be used instead of hash variable.
This commit is contained in:
@@ -116,7 +116,7 @@ _yarn_commands_scripts() {
|
||||
fi
|
||||
|
||||
if [[ -n $packageJson ]]; then
|
||||
scripts=($(cat "$packageJson" | perl -0777 -MJSON::PP -n -E '%r=decode_json($_); say for sort keys %{$r->{scripts}}'))
|
||||
scripts=($(cat "$packageJson" | perl -0777 -MJSON::PP -n -E '$r=decode_json($_); say for sort keys %{$r->{scripts}}'))
|
||||
fi
|
||||
|
||||
_describe 'command or script' _commands -- _global_commands -- scripts -- binaries
|
||||
|
||||
Reference in New Issue
Block a user