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

Re: PATCH: _arguments -C cleanup (was: Re: PATCH: _look)



In article <200005051337.PAA06691@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
  Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx> writes:

> Akira, in _look there was a compadd without a _wanted/description or
> anything. I've made it use the `value' tag with a `values'
> description, is there anything more precise we could use or is that ok?

Sorry.  I forgot it.  I think `word prefix' is better for explanation.
Also this adds completion for an optional second argument.

Index: Completion/User/_look
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_look,v
retrieving revision 1.2
diff -u -r1.2 _look
--- Completion/User/_look	2000/05/05 13:38:46	1.2
+++ Completion/User/_look	2000/05/05 14:43:30
@@ -7,11 +7,12 @@
   '-t+[termination character]:termination character:' \
   '-f[case insensitive]' \
   '-d[dictionary order]' \
-  ':string:->string' && return 0
+  ':string:->string' \
+  ':dictionary file:_files -f' && return 0
 
 case "$state" in
 string)
   [[ -n "$PREFIX" ]] &&
-      _wanted values expl value compadd - $(_call values $words[1] $PREFIX)
+      _wanted values expl 'word prefix' compadd - $(_call values $words[1] $PREFIX)
   ;;
 esac
-- 
Tanaka Akira



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