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

PATCH: _look



This is a completion function for `look'.  It calls `look' itself to
find completions.

Apart from that, I found that some functions using a state of
_arguments such as _gzip declare `curcontext' instead of `context'
which is specified by zshcompsys(1).  Is `curcontext' obsolete?

--- /dev/null	Wed May  6 05:32:27 1998
+++ Completion/User/_look	Fri May  5 18:46:17 2000
@@ -0,0 +1,18 @@
+#compdef look
+
+local context state line
+typeset -A opt_args
+
+_arguments -s \
+  '-t+[termination character]:termination character:' \
+  '-f[case insensitive]' \
+  '-d[dictionary order]' \
+  ':string:->string'
+
+case "$state" in
+string)
+  if [[ -n "$PREFIX" ]]; then
+    compadd - $(_call values $words[1] $PREFIX)
+  fi
+  ;;
+esac
-- 
Tanaka Akira



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