diff options
| author | Akinori MUSHA <knu@idaemons.org> | 2017-05-15 17:40:15 +0900 |
|---|---|---|
| committer | Akinori MUSHA <knu@idaemons.org> | 2017-05-15 17:40:15 +0900 |
| commit | 32b4770dab53a65e96e2231f4441d6e3a0d87fd4 (patch) | |
| tree | 8296f85802bbfba65d21804555209796e5ef4baa /src/_yarn | |
| parent | Merge pull request #501 from mtorromeo/rkt (diff) | |
| download | zsh-completions-32b4770dab53a65e96e2231f4441d6e3a0d87fd4.tar zsh-completions-32b4770dab53a65e96e2231f4441d6e3a0d87fd4.tar.gz zsh-completions-32b4770dab53a65e96e2231f4441d6e3a0d87fd4.tar.bz2 zsh-completions-32b4770dab53a65e96e2231f4441d6e3a0d87fd4.tar.lz zsh-completions-32b4770dab53a65e96e2231f4441d6e3a0d87fd4.tar.xz zsh-completions-32b4770dab53a65e96e2231f4441d6e3a0d87fd4.tar.zst zsh-completions-32b4770dab53a65e96e2231f4441d6e3a0d87fd4.zip | |
Use `sed -E` instead of `-r`
`-E` is more widely supported, including GNU sed.
- [GNU sed](https://www.gnu.org/software/sed/manual/sed.html)
- [macOS](https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/sed.1.html)
- [FreeBSD](https://man.freebsd.org/sed/)
- [NetBSD](http://netbsd.gw.com/cgi-bin/man-cgi?sed)
- [OpenBSD](http://man.openbsd.org/sed.1)
Diffstat (limited to 'src/_yarn')
| -rw-r--r-- | src/_yarn | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 } |
