Move __fish_complete_tar into the completion script

This commit is contained in:
Jason 2019-11-30 21:00:40 +09:00 committed by Fabian Homborg
parent 6245d76e57
commit 6486349725
11 changed files with 19 additions and 139 deletions

View File

@ -3603,14 +3603,6 @@ msgstr ""
msgid "or the file was empty"
msgstr "Nicht vorhandene Dateien als leer behandeln"
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:1
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:2
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:3
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:4
#: /tmp/fish/explicit/share/functions/__fish_complete_unrar.fish:1
msgid "%s\\tArchived file\\n"
msgstr ""
#: /tmp/fish/explicit/share/functions/__fish_complete_zfs_ro_properties.fish:3
#, fuzzy
msgid "Achieved compression ratio"
@ -67211,11 +67203,6 @@ msgstr "Saloppe Einhäng-Optionen tolerieren"
msgid "Complete \"svn diff\" arguments"
msgstr "Anzahl der Argumente zählen"
#: /tmp/fish/implicit/share/functions/__fish_complete_tar.fish:1
#: /tmp/fish/implicit/share/functions/__fish_complete_unrar.fish:1
msgid "Peek inside of archives and list all files"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_user_at_hosts.fish:1
#, fuzzy
msgid "Print list host-names with user@"

View File

@ -3442,14 +3442,6 @@ msgstr ""
msgid "or the file was empty"
msgstr "Treat absent files as empty"
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:1
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:2
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:3
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:4
#: /tmp/fish/explicit/share/functions/__fish_complete_unrar.fish:1
msgid "%s\\tArchived file\\n"
msgstr "%s\\tArchived file\\n"
#: /tmp/fish/explicit/share/functions/__fish_complete_zfs_ro_properties.fish:3
msgid "Achieved compression ratio"
msgstr "Achieved compression ratio"
@ -66561,11 +66553,6 @@ msgstr "Complete using path"
msgid "Complete \"svn diff\" arguments"
msgstr "Complete “svn diff” arguments"
#: /tmp/fish/implicit/share/functions/__fish_complete_tar.fish:1
#: /tmp/fish/implicit/share/functions/__fish_complete_unrar.fish:1
msgid "Peek inside of archives and list all files"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_user_at_hosts.fish:1
#, fuzzy
msgid "Print list host-names with user@"

View File

@ -3623,14 +3623,6 @@ msgstr ""
msgid "or the file was empty"
msgstr "ou le fichier était vide"
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:1
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:2
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:3
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:4
#: /tmp/fish/explicit/share/functions/__fish_complete_unrar.fish:1
msgid "%s\\tArchived file\\n"
msgstr "%s\\tFichier archivé\\n"
#: /tmp/fish/explicit/share/functions/__fish_complete_zfs_ro_properties.fish:3
msgid "Achieved compression ratio"
msgstr "Taux de compression attein"
@ -65537,11 +65529,6 @@ msgstr "Compléter en utilisant les fichiers"
msgid "Complete \"svn diff\" arguments"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_tar.fish:1
#: /tmp/fish/implicit/share/functions/__fish_complete_unrar.fish:1
msgid "Peek inside of archives and list all files"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_user_at_hosts.fish:1
#, fuzzy
msgid "Print list host-names with user@"

View File

@ -3377,14 +3377,6 @@ msgstr ""
msgid "or the file was empty"
msgstr ""
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:1
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:2
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:3
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:4
#: /tmp/fish/explicit/share/functions/__fish_complete_unrar.fish:1
msgid "%s\\tArchived file\\n"
msgstr ""
#: /tmp/fish/explicit/share/functions/__fish_complete_zfs_ro_properties.fish:3
msgid "Achieved compression ratio"
msgstr ""
@ -61999,11 +61991,6 @@ msgstr ""
msgid "Complete \"svn diff\" arguments"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_tar.fish:1
#: /tmp/fish/implicit/share/functions/__fish_complete_unrar.fish:1
msgid "Peek inside of archives and list all files"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_user_at_hosts.fish:1
msgid "Print list host-names with user@"
msgstr ""

View File

@ -3377,14 +3377,6 @@ msgstr ""
msgid "or the file was empty"
msgstr ""
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:1
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:2
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:3
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:4
#: /tmp/fish/explicit/share/functions/__fish_complete_unrar.fish:1
msgid "%s\\tArchived file\\n"
msgstr ""
#: /tmp/fish/explicit/share/functions/__fish_complete_zfs_ro_properties.fish:3
msgid "Achieved compression ratio"
msgstr ""
@ -61999,11 +61991,6 @@ msgstr ""
msgid "Complete \"svn diff\" arguments"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_tar.fish:1
#: /tmp/fish/implicit/share/functions/__fish_complete_unrar.fish:1
msgid "Peek inside of archives and list all files"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_user_at_hosts.fish:1
msgid "Print list host-names with user@"
msgstr ""

View File

@ -3435,14 +3435,6 @@ msgstr ""
msgid "or the file was empty"
msgstr ""
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:1
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:2
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:3
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:4
#: /tmp/fish/explicit/share/functions/__fish_complete_unrar.fish:1
msgid "%s\\tArchived file\\n"
msgstr ""
#: /tmp/fish/explicit/share/functions/__fish_complete_zfs_ro_properties.fish:3
msgid "Achieved compression ratio"
msgstr ""
@ -62588,11 +62580,6 @@ msgstr ""
msgid "Complete \"svn diff\" arguments"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_tar.fish:1
#: /tmp/fish/implicit/share/functions/__fish_complete_unrar.fish:1
msgid "Peek inside of archives and list all files"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_user_at_hosts.fish:1
msgid "Print list host-names with user@"
msgstr ""

View File

@ -3578,14 +3578,6 @@ msgstr ""
msgid "or the file was empty"
msgstr "Treat absent files as empty"
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:1
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:2
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:3
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:4
#: /tmp/fish/explicit/share/functions/__fish_complete_unrar.fish:1
msgid "%s\\tArchived file\\n"
msgstr ""
#: /tmp/fish/explicit/share/functions/__fish_complete_zfs_ro_properties.fish:3
#, fuzzy
msgid "Achieved compression ratio"
@ -67681,11 +67673,6 @@ msgstr "Tolerate sloppy mount options"
msgid "Complete \"svn diff\" arguments"
msgstr "Count the number of arguments"
#: /tmp/fish/implicit/share/functions/__fish_complete_tar.fish:1
#: /tmp/fish/implicit/share/functions/__fish_complete_unrar.fish:1
msgid "Peek inside of archives and list all files"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_user_at_hosts.fish:1
#, fuzzy
msgid "Print list host-names with user@"

View File

@ -3381,14 +3381,6 @@ msgstr ""
msgid "or the file was empty"
msgstr ""
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:1
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:2
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:3
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:4
#: /tmp/fish/explicit/share/functions/__fish_complete_unrar.fish:1
msgid "%s\\tArchived file\\n"
msgstr ""
#: /tmp/fish/explicit/share/functions/__fish_complete_zfs_ro_properties.fish:3
msgid "Achieved compression ratio"
msgstr ""
@ -62003,11 +61995,6 @@ msgstr ""
msgid "Complete \"svn diff\" arguments"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_tar.fish:1
#: /tmp/fish/implicit/share/functions/__fish_complete_unrar.fish:1
msgid "Peek inside of archives and list all files"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_user_at_hosts.fish:1
msgid "Print list host-names with user@"
msgstr ""

View File

@ -3419,14 +3419,6 @@ msgstr ""
msgid "or the file was empty"
msgstr ""
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:1
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:2
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:3
#: /tmp/fish/explicit/share/functions/__fish_complete_tar.fish:4
#: /tmp/fish/explicit/share/functions/__fish_complete_unrar.fish:1
msgid "%s\\tArchived file\\n"
msgstr ""
#: /tmp/fish/explicit/share/functions/__fish_complete_zfs_ro_properties.fish:3
msgid "Achieved compression ratio"
msgstr ""
@ -62549,11 +62541,6 @@ msgstr ""
msgid "Complete \"svn diff\" arguments"
msgstr "参数的个数的计数"
#: /tmp/fish/implicit/share/functions/__fish_complete_tar.fish:1
#: /tmp/fish/implicit/share/functions/__fish_complete_unrar.fish:1
msgid "Peek inside of archives and list all files"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_user_at_hosts.fish:1
msgid "Print list host-names with user@"
msgstr ""

View File

@ -1,5 +1,23 @@
function __fish_complete_tar -d "Peek inside of archives and list all files"
set -l args (commandline -poc)
while count $args >/dev/null
switch $args[1]
case '-*f' '--file'
set -e args[1]
if test -f $args[1]
set -l file_list (tar -atf $args[1] 2> /dev/null)
if test -n "$file_list"
printf (_ "%s\tArchived file\n") $file_list
end
return
end
case '*'
set -e args[1]
continue
end
end
end
# Peek inside of archives and list all files
complete -c tar -a "(__fish_complete_tar)"
complete -c tar -s A -l catenate -d "Append archive to archive"

View File

@ -1,21 +0,0 @@
function __fish_complete_tar -d "Peek inside of archives and list all files"
set -l args (commandline -poc)
while count $args >/dev/null
switch $args[1]
case '-*f' '--file'
set -e args[1]
if test -f $args[1]
set -l file_list (tar -atf $args[1] 2> /dev/null)
if test -n "$file_list"
printf (_ "%s\tArchived file\n") $file_list
end
return
end
case '*'
set -e args[1]
continue
end
end
end