Skip to content

Commit 6dadd2a

Browse files
authored
Merge pull request #511 from yous/fix-bsd-sed
Replace character with newline using `tr`
2 parents 1f590a0 + aa4c6d0 commit 6dadd2a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/_yarn

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ _global_commands=(
7676

7777
_yarn_commands_scripts() {
7878
local -a scripts
79-
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'))
79+
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'))
8080
_describe 'command or script' _commands -- _global_commands -- scripts
8181
}
8282

8383
_yarn_scripts() {
8484
local -a scripts
85-
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'))
85+
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'))
8686
_describe 'script' scripts
8787
}
8888

0 commit comments

Comments
 (0)