Skip to content

Commit

Permalink
Merge pull request #511 from yous/fix-bsd-sed
Browse files Browse the repository at this point in the history
Replace character with newline using `tr`
  • Loading branch information
nicoulaj authored Jul 18, 2017
2 parents 1f590a0 + aa4c6d0 commit 6dadd2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/_yarn
Original file line number Diff line number Diff line change
Expand Up @@ -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;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' | tr , '\n'))
_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;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' | tr , '\n'))
_describe 'script' scripts
}

Expand Down

0 comments on commit 6dadd2a

Please sign in to comment.