mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 10:57:30 +08:00
completions/wvdial: Use path
This commit is contained in:
parent
2f997ba8a2
commit
0963e6769e
|
@ -15,15 +15,13 @@ function __fish_complete_wvdial_peers --description 'Complete wvdial peers' --ar
|
|||
case -C --config
|
||||
set store_next true
|
||||
case '--config=*'
|
||||
set cfgfiles (echo $opt | string replace '--config=' '')
|
||||
set cfgfiles (string replace '--config=' '' -- $opt)
|
||||
end
|
||||
end
|
||||
|
||||
for file in $cfgfiles
|
||||
if test -f $file
|
||||
string match -r '\[Dialer' <$file | string replace -r '\[Dialer (.+)\]' '$1'
|
||||
end
|
||||
end | sort -u | string match -v Defaults
|
||||
for file in (path filter -rf -- $cfgfiles)
|
||||
string match -r '\[Dialer' <$file | string replace -r '\[Dialer (.+)\]' '$1'
|
||||
end | path sort -u | string match -v Defaults
|
||||
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user