From d84a6d3b21c185a6d176741dd626edb6fd15dc1b Mon Sep 17 00:00:00 2001 From: Shohei YOSHIDA Date: Thu, 30 Dec 2021 11:51:55 +0900 Subject: [PATCH] Fix perl one liner bug decode_json returns hash reference, so scalar variable should be used instead of hash variable. --- src/_yarn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_yarn b/src/_yarn index 9db0260..1cce1b1 100644 --- a/src/_yarn +++ b/src/_yarn @@ -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