From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5548 invoked from network); 10 May 2000 10:00:43 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 10 May 2000 10:00:43 -0000 Received: (qmail 10827 invoked by alias); 10 May 2000 10:00:34 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11296 Received: (qmail 10758 invoked from network); 10 May 2000 10:00:28 -0000 To: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: Re: _arguments problems References: <200005100920.LAA13270@beta.informatik.hu-berlin.de> MIME-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: text/plain; charset=US-ASCII From: Tanaka Akira Date: 10 May 2000 19:01:38 +0900 In-Reply-To: <200005100920.LAA13270@beta.informatik.hu-berlin.de> (Sven Wischnowsky's message of "Wed, 10 May 2000 11:20:04 +0200 (MET DST)") 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) In article <200005100920.LAA13270@beta.informatik.hu-berlin.de>, Sven Wischnowsky writes: > I don't get an error message, but I don't get the `B' inserted, > either. The code that calculates which arguments are to be completed > didn't take the `*pat' things into account. Z(4):akr@serein% Src/zsh -f serein% bindkey -e; autoload -U compinit; compinit -D; compdef _tst tst serein% _tst () { _arguments '-o:*a:a:(a)' ':A:(A)' ':B:(B)' } serein% tst -o a A B It shouln't complete `B'. > > It completes nothing. context parameter is not set? > > Yes. Which part of the docs made you think it would be set? $context > is only mentioned for the `->state' actions and only then will it be > set. I didn't think following paragraph is applied only when `->state' is used. Maybe, this is my fault. The parameter `context' will be set to the automatically created context names. These are either strings of the form `option-opt-n' for the n'th argument of the option -opt, or strings of the form `argument-n' for the n'th argument (for rest arguments the n is the string `rest'). For example, when completing the argument of the -o option, the name is `option-o-1' and for the second normal (non-option-) argument it is `argument-2'. -- Tanaka Akira