From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7139 invoked from network); 18 Oct 2000 04:31:51 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 18 Oct 2000 04:31:51 -0000 Received: (qmail 292 invoked by alias); 18 Oct 2000 04:31:44 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13016 Received: (qmail 269 invoked from network); 18 Oct 2000 04:31:42 -0000 From: "Bart Schaefer" Message-Id: <1001018043131.ZM3958@candle.brasslantern.com> Date: Wed, 18 Oct 2000 04:31:31 +0000 References: <1001006145848.ZM25084@candle.brasslantern.com> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: Re: Standard setopts for completion system, again MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Fri, 6 Oct 2000 I wrote: } Unfortunately, we heavily recommend autoloading all completion functions } with "autoload -U", which means an alias won't be expanded! It occurred to me somewhat later that, even with "autoload -U", an alias *would* be expanded during an "eval". So we could put this: alias _comp_setopt='setopt nullglob rcexpandparam extendedglob unset \ no{markdirs,globsubst,shwordsplit,shglob,ksharrays,cshnullglob}' into compinit, and then in the completion functions like _main_complete: eval _comp_setopt localoptions Another choice (still in compinit) would be simply to stuff the desired options into an array: _comp_setopts=(nullglob rcexpandparam extendedglob unset no{markdirs,globsubst,shwordsplit,shglob,ksharrays,cshnullglob}) and then reference them: setopt localoptions $_comp_setopts I guess I slightly prefer the latter, since we're already cluttering the parameter space with completion stuff and I'd rather stay out of the alias space, but either one would be OK. -- 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