Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: md5sum completion function



On Thu, Sep 27, 2007 at 11:49:36PM -0700, Jesse W wrote:
> Here is a completion function for the md5sum tool (the version included 
> with the dpkg project).

This updates it for GNU md5sum.  The dpkg md5sum was dropped in 2006; do
people still use it?

Index: Completion/Unix/Command/_md5sum
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_md5sum,v
retrieving revision 1.1
diff -u -r1.1 _md5sum
--- Completion/Unix/Command/_md5sum	28 Sep 2007 08:42:17 -0000	1.1
+++ Completion/Unix/Command/_md5sum	28 Sep 2007 08:44:18 -0000
@@ -1,9 +1,11 @@
 #compdef md5sum
 
 _arguments -S \
-    "-v[verbose, print file names when checking]" \
-    "-b[read files in binary mode]" \
-    "(*)-c[check message digests (default is generate)]:md5 digest file:_files -g \*.md5" \
-    "(-)*:file to digest:_files" 
-
-
+  '(-b --binary)'{-b,--binary}'[read in binary mode]' \
+  '(-c --check)'{-c,--check}'[read MD5 sums from the FILEs and check them]' \
+  '(-t --text)'{-t,--text}'[read in text mode]' \
+  '--status[no output, status code shows success]' \
+  '(-w --warn)'{-w,--warn}'[warn about improperly formatted checksum lines]' \
+  '--help[display help and exit]' \
+  '--version[output version information and exit]' \
+  '*:files:_files'



Messages sorted by: Reverse Date, Date, Thread, Author