diff options
author | Aaron Gyes <me@aaron.gy> | 2016-04-08 10:46:51 +0800 |
---|---|---|
committer | David Adam <zanchey@ucc.gu.uwa.edu.au> | 2016-04-08 10:49:29 +0800 |
commit | 36691df6fe4667645b71b550ce5eea90762ac23a (patch) | |
tree | ec2d420e797298da5fd83e4ee514f9643b231835 /share/completions/rustc.fish | |
parent | 790c7f80c7d0fa1c97380885201eb50a2abcce02 (diff) |
Stringify many completions and functions, with --invert stringification.
I believe apm must have been buggy - example output that I found online
showed `tr` was mangling paths with spaces in it. Should be fixed.
Also, use dscl on OS X in __fish_complete_users.fish like
__fish_print_users.fish already does.
Diffstat (limited to 'share/completions/rustc.fish')
-rw-r--r-- | share/completions/rustc.fish | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/share/completions/rustc.fish b/share/completions/rustc.fish index d5caa03c..8dadcaf6 100644 --- a/share/completions/rustc.fish +++ b/share/completions/rustc.fish @@ -49,13 +49,13 @@ for line in $rust_docs end set -l rust_docs (rustc -W help \ - | egrep \ - '(\s+)(.+)(\s+)(allow|warn|deny|forbid)(\s+){2}([^\n]+)' \ + | string match -r \ + '(?:\s+)(?:.+)(?:\s+)(?:allow|warn|deny|forbid)(?:\s+){2}(?:[^\n]+)' \ | string replace -r -i \ '(\s+)(.+)(\s+)(allow|warn|deny|forbid)(\s+){2}([^\n]+)' '$2 $6' \ | string match -r '^.*[^:]$' \ - | egrep -v '^(allow|warn|deny|forbid)$' \ - | egrep -v '^([a-z\-]+)(\s+)(allow|warn|deny|forbid)') + | string match -r -v '^(allow|warn|deny|forbid)$' \ + | string match -r -v '^([a-z\-]+)(\s+)(allow|warn|deny|forbid)') for line in $rust_docs set docs (string split -m 1 ' ' $line) |