From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28079 invoked by alias); 5 Feb 2014 17:15:16 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 32353 Received: (qmail 20284 invoked from network); 5 Feb 2014 17:15:11 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 From: Bart Schaefer Message-id: <140205091501.ZM22649@torch.brasslantern.com> Date: Wed, 05 Feb 2014 09:15:01 -0800 In-reply-to: <874n4dpss0.fsf@lwm.klanderman.net> Comments: In reply to Greg Klanderman "Re: Tests of interrupting completion, and completion_nostat_dirs" (Feb 5, 8:56am) References: <140122000435.ZM1516@torch.brasslantern.com> <140123171659.ZM19422@torch.brasslantern.com> <87iot91lp8.fsf@lwm.klanderman.net> <140125124934.ZM23767@torch.brasslantern.com> <87eh3q3g63.fsf@lwm.klanderman.net> <140129181206.ZM22813@torch.brasslantern.com> <20140130093057.6e04fa53@pwslap01u.europe.root.pri> <140130082206.ZM23682@torch.brasslantern.com> <874n4g1blj.fsf@lwm.klanderman.net> <140204212859.ZM21837@torch.brasslantern.com> <874n4dpss0.fsf@lwm.klanderman.net> <20140205142303.400fe22b@pwslap01u.europe.root.pri> In-reply-to: <20140205142303.400fe22b@pwslap01u.europe.root.pri> Comments: In reply to Peter Stephenson "Re: Tests of interrupting completion, and completion_nostat_dirs" (Feb 5, 2:23pm) X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Tests of interrupting completion, and completion_nostat_dirs MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Feb 5, 8:56am, Greg Klanderman wrote: } } >>>>> On February 5, 2014 Bart Schaefer wrote: } } > I think I'd have ztat() call getaparam() rather than declare } > a C array tied to a special variable (compare the way zle_refresh.c } > handles zle_highlight) but I'll stop at that. } } Thank you Bart, the only downside I see is that I currently use the } existence of the special variable to decide whether to configure the } automount points in the fake-files zstyle [...] } } If I use getaparam, is the only way to test if the feature exists with } a ZSH_VERSION / ZSH_PATCHLEVEL check? Do we have any mechanism for } creating named features to test against? You could declare it as a provided feature in the zsh/complete module, and test for it with "zmodload -l ...". I'm not sure whether you can declare that a module has a "p:" (parameter) feature but not have any real special parameter to go with it ... On Feb 5, 2:23pm, Peter Stephenson wrote: } } Looks like the right answer is to add the parameter within } complete.c. And declare it as a feature to solve Greg's problem above? If it's only a special parameter when completion is actually in progress, it can't be tested from a startup file.