From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2638 invoked from network); 14 Aug 2000 07:16:10 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 14 Aug 2000 07:16:10 -0000 Received: (qmail 19935 invoked by alias); 14 Aug 2000 07:15:46 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12606 Received: (qmail 19914 invoked from network); 14 Aug 2000 07:15:44 -0000 From: "Bart Schaefer" Message-Id: <1000814071534.ZM18590@candle.brasslantern.com> Date: Mon, 14 Aug 2000 07:15:34 +0000 In-Reply-To: <20000814055143.26862.qmail@web1104.mail.yahoo.com> Comments: In reply to Felix Rosencrantz "Re: Completing parameter names that have yet to be set." (Aug 13, 10:51pm) References: <20000814055143.26862.qmail@web1104.mail.yahoo.com> X-Mailer: Z-Mail (5.0.0 30July97) To: Felix Rosencrantz , zsh-workers Subject: Re: Completing parameter names that have yet to be set. MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Aug 13, 10:51pm, Felix Rosencrantz wrote: } Subject: Re: Completing parameter names that have yet to be set. } } For example, in my source code tree I might want to look at ".[ch]" } files first, but in logs directory I want to look ".{log,out}" files } first. I can use tags, but I still have to list tags for ".[ch]" and } for the ".{logs,out}" files. And if both types of directories contain } files that match both tags, there will be at least one directory where I } always get the incorrect completion the first time. } } [...] } } It seems that the ability to configure styles based on additional } information not found in the context requires the ability to treat a } group of styles as a single whole, and quickly set/unset a group of } styles. I vaguely remember something like this was talked about, but } don't remember what was decided. This is what both `zstyle -e' and the `func()' value for the tag-order style are supposed to accomplish, I think. In fact, given `zstyle -e', we could probably do away with `tag-order func()'. zstyle ':completion:*' file-patterns \ '*.[ch]:c-sources' '*.(log|out):log-files' '%p:all-files' zstyle -e ':completion::complete:*' tag-order \ 'if [[ -d $PREFIX/CVS ]]; then reply=(c-sources all-files); else if [[ $PREFIX == */log ]]; then reply=(log-files all-files); fi' Or something like that, I didn't try it so I've probably got it cockeyed. And of course you'd have to come up with a more sophisticated test for $PREFIX or whatever, to tell what kind of directory is what. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net