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

PATCH: _look refinement.



This refines _look.

* display message when an argument is empty.
* remove `-f'.

Index: Completion/User/_look
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_look,v
retrieving revision 1.3
diff -u -r1.3 _look
--- Completion/User/_look	2000/05/05 14:48:04	1.3
+++ Completion/User/_look	2000/05/16 00:48:42
@@ -8,11 +8,14 @@
   '-f[case insensitive]' \
   '-d[dictionary order]' \
   ':string:->string' \
-  ':dictionary file:_files -f' && return 0
+  ':dictionary file:_files' && return 0
 
 case "$state" in
 string)
-  [[ -n "$PREFIX" ]] &&
-      _wanted values expl 'word prefix' compadd - $(_call values $words[1] $PREFIX)
+  if [[ -n "$PREFIX" ]]; then
+    _wanted values expl 'word prefix' compadd - $(_call values $words[1] $PREFIX)
+  else
+    _message 'word prefix'
+  fi
   ;;
 esac
-- 
Tanaka Akira



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