From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5299 invoked from network); 5 May 2000 11:31:07 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 5 May 2000 11:31:07 -0000 Received: (qmail 4443 invoked by alias); 5 May 2000 11:30:57 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11190 Received: (qmail 4377 invoked from network); 5 May 2000 11:30:53 -0000 To: zsh-workers@sunsite.auc.dk Subject: PATCH: _look MIME-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: text/plain; charset=US-ASCII From: Tanaka Akira Date: 05 May 2000 20:31:26 +0900 Message-ID: User-Agent: T-gnus/6.14.1 (based on Gnus v5.8.3) (revision 16) SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) Emacs/20.6 (i686-pc-linux-gnu) MULE/4.0 (HANANOEN) 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