mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-10 07:04:29 +00:00
Move __fish_complete_tar into the completion script
This commit is contained in:
parent
6245d76e57
commit
6486349725
11 changed files with 19 additions and 139 deletions
13
po/de.po
13
po/de.po
|
@ -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@"
|
||||
|
|
13
po/en.po
13
po/en.po
|
@ -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@"
|
||||
|
|
13
po/fr.po
13
po/fr.po
|
@ -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@"
|
||||
|
|
13
po/nb.po
13
po/nb.po
|
@ -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 ""
|
||||
|
|
13
po/nn.po
13
po/nn.po
|
@ -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 ""
|
||||
|
|
13
po/pl.po
13
po/pl.po
|
@ -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 ""
|
||||
|
|
13
po/pt_BR.po
13
po/pt_BR.po
|
@ -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@"
|
||||
|
|
13
po/sv.po
13
po/sv.po
|
@ -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 ""
|
||||
|
|
13
po/zh_CN.po
13
po/zh_CN.po
|
@ -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 ""
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
Loading…
Reference in a new issue