diff options
author | Oliver Kiddle <opk@users.sourceforge.net> | 2000-05-05 10:08:25 +0000 |
---|---|---|
committer | Oliver Kiddle <opk@users.sourceforge.net> | 2000-05-05 10:08:25 +0000 |
commit | 93fb9aaec51f597a9a19b06764f005952e447e54 (patch) | |
tree | b8fc3a394c943f8dcb77b7f8f12c3e80aedd79f7 /Completion/User/_pack | |
parent | 27f895df41af61a8ba678c390a5ef405109e8187 (diff) | |
download | zsh-93fb9aaec51f597a9a19b06764f005952e447e54.tar.gz zsh-93fb9aaec51f597a9a19b06764f005952e447e54.tar.xz zsh-93fb9aaec51f597a9a19b06764f005952e447e54.zip |
Use one function for compression/decompression programs and new lzop completion
Diffstat (limited to 'Completion/User/_pack')
-rw-r--r-- | Completion/User/_pack | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/Completion/User/_pack b/Completion/User/_pack index a15cfa709..5ec7a160c 100644 --- a/Completion/User/_pack +++ b/Completion/User/_pack @@ -1,6 +1,16 @@ -#compdef pack +#compdef pack pcat unpack -local expl +local expl state line -_description expl 'file to compress' -_files "$expl[@]" -g '*~*.z' +case ${words[1]:t} in + pack) + _arguments -C \ + '-f[force packing even for files which will not benefit]' \ + '-[show statistics for files]' \ + '*:file to compress:_files -g \*\~\*.z' + ;; + pcat|unpack) + _description files expl 'compressed file' + _files "$expl[@]" -g '*.z' + ;; +esac |