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/functions/__fish_complete_wvdial_peers.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/functions/__fish_complete_wvdial_peers.fish')
-rw-r--r-- | share/functions/__fish_complete_wvdial_peers.fish | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/share/functions/__fish_complete_wvdial_peers.fish b/share/functions/__fish_complete_wvdial_peers.fish index 11155b1e..5eab088b 100644 --- a/share/functions/__fish_complete_wvdial_peers.fish +++ b/share/functions/__fish_complete_wvdial_peers.fish @@ -15,15 +15,15 @@ function __fish_complete_wvdial_peers --description 'Complete wvdial peers' --ar case -C --config set store_next true case '--config=*' - set cfgfiles (echo $opt | sed 's/--config=//') + set cfgfiles (echo $opt | string replace '--config=' '') end end for file in $cfgfiles if test -f $file - cat $file | grep '\[Dialer' | sed 's/\[Dialer \(.\+\)\]/\1/' + string match -r '\[Dialer' < $file | string replace -r '\[Dialer (.+)\]' '$1' end - end | sort -u | grep -v Defaults + end | sort -u | string match -v Defaults end |