diff options
Diffstat (limited to 'Completion/Unix')
-rw-r--r-- | Completion/Unix/Command/_tar | 2 | ||||
-rw-r--r-- | Completion/Unix/Type/_tar_archive | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_tar b/Completion/Unix/Command/_tar index 3e3b3fc51..b3a590d72 100644 --- a/Completion/Unix/Command/_tar +++ b/Completion/Unix/Command/_tar @@ -21,6 +21,8 @@ local _tar_cmd tf tmp tmpb del index # from some of the possible long options, and from the second word if # that does not start with a hyphen. +_pick_variant gnu=GNU unix --version + tmp=("${(@M)words:#-[^-]*}") _tar_cmd="${(j::)tmp#-}" diff --git a/Completion/Unix/Type/_tar_archive b/Completion/Unix/Type/_tar_archive index 95a864cee..eceaea875 100644 --- a/Completion/Unix/Type/_tar_archive +++ b/Completion/Unix/Type/_tar_archive @@ -18,6 +18,8 @@ if [[ "$1" = *[urtx]* ]]; then _files "$expl[@]" -g '*.((tar|TAR).(gz|GZ|Z)|tgz)(-.)' elif [[ "$1" = *[Ijy]* ]]; then _files "$expl[@]" -g '*.(tar|TAR).bz2(-.)' + elif [[ "$_cmd_variant[$service]" == gnu ]]; then + _files "$expl[@]" -g '*.((tar|TAR).(gz|GZ|Z|bz2)|tgz)(-.)' else _files "$expl[@]" -g '*.(tar|TAR)(-.)' fi |