mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-10 15:14:44 +00:00
completions/wvdial: Use path
This commit is contained in:
parent
2f997ba8a2
commit
0963e6769e
1 changed files with 4 additions and 6 deletions
|
@ -15,15 +15,13 @@ function __fish_complete_wvdial_peers --description 'Complete wvdial peers' --ar
|
||||||
case -C --config
|
case -C --config
|
||||||
set store_next true
|
set store_next true
|
||||||
case '--config=*'
|
case '--config=*'
|
||||||
set cfgfiles (echo $opt | string replace '--config=' '')
|
set cfgfiles (string replace '--config=' '' -- $opt)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
for file in $cfgfiles
|
for file in (path filter -rf -- $cfgfiles)
|
||||||
if test -f $file
|
string match -r '\[Dialer' <$file | string replace -r '\[Dialer (.+)\]' '$1'
|
||||||
string match -r '\[Dialer' <$file | string replace -r '\[Dialer (.+)\]' '$1'
|
end | path sort -u | string match -v Defaults
|
||||||
end
|
|
||||||
end | sort -u | string match -v Defaults
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue