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

Re: PATCH: new and updated completions



Sven Wischnowsky wrote:
> 
> Yes, here is the patch.  It adds the -w option to _values which means
> that it will look at all words on the line.

Cheers.

> >  I'm not sure whether
> > there shouldn't be exclusions between bs and ibs/obs for dd but as the
> > exclusions don't work here, I didn't worry.
> 
> You can now start to worry ;-)

There are inconsistencies between different variants of UNIX as to how a
mixture of bs and ibs/obs is handled. It doesn't make a great deal of
sense to mix them and it is generally good to cut down the number of
completions so I've put the exclusions in. I've also added exclusions
for the conversion types.

Oliver

Index: Completion/Unix/Command/_dd
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_dd,v
retrieving revision 1.4
diff -u -r1.4 _dd
--- Completion/Unix/Command/_dd 2001/08/08 07:20:57     1.4
+++ Completion/Unix/Command/_dd 2001/08/08 17:19:31
@@ -1,16 +1,17 @@
 #compdef dd
 
-local opts
-
 _values -w 'option' \
   'if[specify input file]:input file:_tilde_files' \
   'of[specify output file]:output file:_tilde_files' \
-  'ibs[input block size]:block size (bytes)' \
-  'obs[output block size]:block size (bytes)' \
-  'bs[block size]:block size (bytes)' \
+  '(bs)ibs[input block size]:block size (bytes)' \
+  '(bs)obs[output block size]:block size (bytes)' \
+  '(ibs obs)bs[block size]:block size (bytes)' \
   'cbs[conversion buffer size]:buffer size (bytes)' \
   'skip[input blocks initially skipped]:blocks' \
   'seek[output blocks initially skipped]:blocks' \
   'files[specify number of input files to copy and concatenate]:number of files' \
   'count[number of input blocks to copy]:blocks' \
-  'conv[specify conversions to apply]:conversion:_values -s , "conversion" ascii ebcdic ibm block unblock lcase ucase swab noerror sync'
+  'conv[specify conversions to apply]:conversion:_values -s , conversion
+    "(ebcdic ibm)ascii" "(ascii ibm)ebcdic" "(ascii ebcdic)ibm"
+    "(unblock)block" "(block)unblock"
+    "(ucase)lcase" "(lcase)ucase" swab noerror sync'



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