yarn: escape colons when getting scripts from package.json
This commit is contained in:
parent
372f9b47e9
commit
155c2a9939
|
@ -76,13 +76,13 @@ _global_commands=(
|
|||
|
||||
_yarn_commands_scripts() {
|
||||
local -a scripts
|
||||
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' | tr , '\n'))
|
||||
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' | tr , '\n' | sed -e 's/:/\\:/g'))
|
||||
_describe 'command or script' _commands -- _global_commands -- scripts
|
||||
}
|
||||
|
||||
_yarn_scripts() {
|
||||
local -a scripts
|
||||
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' | tr , '\n'))
|
||||
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' | tr , '\n' | sed -e 's/:/\\:/g'))
|
||||
_describe 'script' scripts
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue