From 9867c4091e71e6ed69889a9bfaee07275d2fa04e Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Thu, 19 Aug 1999 11:18:05 +0000 Subject: manual/7448 --- Completion/User/_tar_archive | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'Completion/User/_tar_archive') diff --git a/Completion/User/_tar_archive b/Completion/User/_tar_archive index 58e436c4d..9ddf434f5 100644 --- a/Completion/User/_tar_archive +++ b/Completion/User/_tar_archive @@ -7,14 +7,18 @@ # If your version of `tar' supports this you may want to complete # things like `host:file' or `user@host:file' here. +local expl + [[ $# -eq 0 && $+_tar_cmd -ne 0 ]] && set "$_tar_cmd" +_description expl 'archive file' + if [[ "$1" = *[tx]* ]]; then if [[ "$1" = *[zZ]* ]]; then - _files -g '*.((tar|TAR).(gz|GZ|Z)|.tgz)' + _files "$expl[@]" -g '*.((tar|TAR).(gz|GZ|Z)|.tgz)' else - _files -g '*.(tar|TAR)' + _files "$expl[@]" -g '*.(tar|TAR)' fi else - _files + _files "$expl[@]" fi -- cgit 1.4.1