diff --git a/src/_yarn b/src/_yarn index 1947437..7d2ba86 100644 --- a/src/_yarn +++ b/src/_yarn @@ -76,13 +76,13 @@ _global_commands=( _yarn_commands_scripts() { local -a scripts - scripts=($(yarn run --json 2>/dev/null | sed -r '/Commands available|possibleCommands/!d;s/.*Commands available from binary scripts: ([^"]+)".*/\1/;s/.*"items":\[([^]]+).*/\1/;s/[" ]//g;s/,/\n/g')) + scripts=($(yarn run --json 2>/dev/null | sed -E '/Commands available|possibleCommands/!d;s/.*Commands available from binary scripts: ([^"]+)".*/\1/;s/.*"items":\[([^]]+).*/\1/;s/[" ]//g;s/,/\n/g')) _describe 'command or script' _commands -- _global_commands -- scripts } _yarn_scripts() { local -a scripts - scripts=($(yarn run --json 2>/dev/null | sed -r '/Commands available|possibleCommands/!d;s/.*Commands available from binary scripts: ([^"]+)".*/\1/;s/.*"items":\[([^]]+).*/\1/;s/[" ]//g;s/,/\n/g')) + scripts=($(yarn run --json 2>/dev/null | sed -E '/Commands available|possibleCommands/!d;s/.*Commands available from binary scripts: ([^"]+)".*/\1/;s/.*"items":\[([^]]+).*/\1/;s/[" ]//g;s/,/\n/g')) _describe 'script' scripts }