fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
78c948282
master
1function __fish_complete_wvdial_peers --description'Complete wvdial peers' --argument-names cfgfiles 2set -q cfgfiles[ 1 ] 3or set -l cfgfiles /etc/wvdial.conf ~/.wvdialrc 4 5# test if there is an alternative config file specified 6set -l store_next 7for optin ( commandline -cpx) 8if set -q store_next[ 1 ] 9set store_next 10set cfgfiles$opt 11continue 12end 13 14switch $opt 15case -C --config 16set store_next true 17case '--config=*' 18set cfgfiles( string replace'--config=' '' --$opt ) 19end 20end 21 22for filein ( path filter -rf --$cfgfiles ) 23string match -r'\[Dialer' < $file | string replace -r'\[Dialer (.+)\]' '$1' 24end | path sort -u| string match -v Defaults 25 26end 27 28complete -c wvdial -xa"(__fish_complete_wvdial_peers)" -d"wvdial connections" 29complete -c wvdial -s c -l chat -d'Run wvdial as chat replacement from within pppd' 30complete -c wvdial -s C -l config -r -d'Run wvdial with alternative config file' 31complete -c wvdial -s n -l no-syslog -d'Don\'t output debug information'