diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-04-15 18:20:19 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-04-15 18:20:19 +0000 |
commit | 04a89199d02a3ee6c4b3d89a6c782bdb0a4f1bc8 (patch) | |
tree | 2215f99f95d55660fc939a029bf965c454d080b5 /Completion/User/_tar_archive | |
parent | 7a0415cfd70a02b2280d27556c6c54cef1c86e1a (diff) | |
download | zsh-04a89199d02a3ee6c4b3d89a6c782bdb0a4f1bc8.tar.gz zsh-04a89199d02a3ee6c4b3d89a6c782bdb0a4f1bc8.tar.xz zsh-04a89199d02a3ee6c4b3d89a6c782bdb0a4f1bc8.zip |
zsh-3.1.5-pws-12 zsh-3.1.5-pws-12
Diffstat (limited to 'Completion/User/_tar_archive')
-rw-r--r-- | Completion/User/_tar_archive | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Completion/User/_tar_archive b/Completion/User/_tar_archive new file mode 100644 index 000000000..58e436c4d --- /dev/null +++ b/Completion/User/_tar_archive @@ -0,0 +1,20 @@ +#autoload + +# This is used to generate filenames usable as a tar archive. This may +# get one argument, a collection of tar option characters that may be +# used to find out what kind of filename is needed. If no argument is +# given but the parameter `_tar_cmd' is set, that is used. +# If your version of `tar' supports this you may want to complete +# things like `host:file' or `user@host:file' here. + +[[ $# -eq 0 && $+_tar_cmd -ne 0 ]] && set "$_tar_cmd" + +if [[ "$1" = *[tx]* ]]; then + if [[ "$1" = *[zZ]* ]]; then + _files -g '*.((tar|TAR).(gz|GZ|Z)|.tgz)' + else + _files -g '*.(tar|TAR)' + fi +else + _files +fi |