about summary refs log tree commit diff
path: root/Completion/User/_pack
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2000-05-05 10:08:25 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2000-05-05 10:08:25 +0000
commit93fb9aaec51f597a9a19b06764f005952e447e54 (patch)
treeb8fc3a394c943f8dcb77b7f8f12c3e80aedd79f7 /Completion/User/_pack
parent27f895df41af61a8ba678c390a5ef405109e8187 (diff)
downloadzsh-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/_pack18
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