mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-10 07:04:29 +00:00
Move __fish_complete_wvdial_peers into the completion script
This commit is contained in:
parent
6486349725
commit
fa373c102c
11 changed files with 30 additions and 66 deletions
5
po/de.po
5
po/de.po
|
@ -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"
|
||||
|
|
4
po/en.po
4
po/en.po
|
@ -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"
|
||||
|
|
4
po/fr.po
4
po/fr.po
|
@ -65538,10 +65538,6 @@ msgstr "Lister les noms d’hô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"
|
||||
|
|
4
po/nb.po
4
po/nb.po
|
@ -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 ""
|
||||
|
|
4
po/nn.po
4
po/nn.po
|
@ -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 ""
|
||||
|
|
4
po/pl.po
4
po/pl.po
|
@ -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 ""
|
||||
|
|
|
@ -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"
|
||||
|
|
4
po/sv.po
4
po/sv.po
|
@ -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 ""
|
||||
|
|
|
@ -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 ""
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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
|
Loading…
Reference in a new issue