Move __fish_complete_wvdial_peers into the completion script

This commit is contained in:
Jason 2019-11-30 21:06:44 +09:00 committed by Fabian Homborg
parent 6486349725
commit fa373c102c
11 changed files with 30 additions and 66 deletions

View file

@ -67212,11 +67212,6 @@ msgstr "Liste laufender screen-Sitzungen ausgeben"
msgid "Print a list of local users, with the real user name as a description"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_wvdial_peers.fish:1
#, fuzzy
msgid "Complete wvdial peers"
msgstr "Vergleiche FILE1 mit allen Operanden"
#: /tmp/fish/implicit/share/functions/__fish_complete_zfs_mountpoint_properties.fish:1
#, fuzzy
msgid "Completes with ZFS mountpoint properties"

View file

@ -66562,10 +66562,6 @@ msgstr "Print hostname and user for stdin"
msgid "Print a list of local users, with the real user name as a description"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_wvdial_peers.fish:1
msgid "Complete wvdial peers"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_zfs_mountpoint_properties.fish:1
msgid "Completes with ZFS mountpoint properties"
msgstr "Completes with ZFS mountpoint properties"

View file

@ -65538,10 +65538,6 @@ msgstr "Lister les noms dhôtes connus"
msgid "Print a list of local users, with the real user name as a description"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_wvdial_peers.fish:1
msgid "Complete wvdial peers"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_zfs_mountpoint_properties.fish:1
msgid "Completes with ZFS mountpoint properties"
msgstr "Complète avec les paramètres ZFS de point de montage"

View file

@ -61999,10 +61999,6 @@ msgstr ""
msgid "Print a list of local users, with the real user name as a description"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_wvdial_peers.fish:1
msgid "Complete wvdial peers"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_zfs_mountpoint_properties.fish:1
msgid "Completes with ZFS mountpoint properties"
msgstr ""

View file

@ -61999,10 +61999,6 @@ msgstr ""
msgid "Print a list of local users, with the real user name as a description"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_wvdial_peers.fish:1
msgid "Complete wvdial peers"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_zfs_mountpoint_properties.fish:1
msgid "Completes with ZFS mountpoint properties"
msgstr ""

View file

@ -62588,10 +62588,6 @@ msgstr ""
msgid "Print a list of local users, with the real user name as a description"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_wvdial_peers.fish:1
msgid "Complete wvdial peers"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_zfs_mountpoint_properties.fish:1
msgid "Completes with ZFS mountpoint properties"
msgstr ""

View file

@ -67682,10 +67682,6 @@ msgstr "Print a list of all accepted color names"
msgid "Print a list of local users, with the real user name as a description"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_wvdial_peers.fish:1
msgid "Complete wvdial peers"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_zfs_mountpoint_properties.fish:1
#, fuzzy
msgid "Completes with ZFS mountpoint properties"

View file

@ -62003,10 +62003,6 @@ msgstr ""
msgid "Print a list of local users, with the real user name as a description"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_wvdial_peers.fish:1
msgid "Complete wvdial peers"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_zfs_mountpoint_properties.fish:1
msgid "Completes with ZFS mountpoint properties"
msgstr ""

View file

@ -62549,10 +62549,6 @@ msgstr ""
msgid "Print a list of local users, with the real user name as a description"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_wvdial_peers.fish:1
msgid "Complete wvdial peers"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_zfs_mountpoint_properties.fish:1
msgid "Completes with ZFS mountpoint properties"
msgstr ""

View file

@ -1,3 +1,33 @@
function __fish_complete_wvdial_peers --description 'Complete wvdial peers' --argument cfgfiles
set -q cfgfiles[0]
or set -l cfgfiles /etc/wvdial.conf ~/.wvdialrc
# test if there is an alternative config file specified
set -l store_next
for opt in (commandline -cpo)
if set -q store_next[1]
set store_next
set cfgfiles $opt
continue
end
switch $opt
case -C --config
set store_next true
case '--config=*'
set cfgfiles (echo $opt | string replace '--config=' '')
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
end
complete -c wvdial -xa "(__fish_complete_wvdial_peers)" -d "wvdial connections"
complete -c wvdial -s c -l chat -d 'Run wvdial as chat replacement from within pppd'
complete -c wvdial -s C -l config -r -d 'Run wvdial with alternative config file'

View file

@ -1,29 +0,0 @@
function __fish_complete_wvdial_peers --description 'Complete wvdial peers' --argument cfgfiles
set -q cfgfiles[0]
or set -l cfgfiles /etc/wvdial.conf ~/.wvdialrc
# test if there is an alternative config file specified
set -l store_next
for opt in (commandline -cpo)
if set -q store_next[1]
set store_next
set cfgfiles $opt
continue
end
switch $opt
case -C --config
set store_next true
case '--config=*'
set cfgfiles (echo $opt | string replace '--config=' '')
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
end