From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10314 invoked from network); 9 Jun 1999 15:40:52 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 9 Jun 1999 15:40:52 -0000 Received: (qmail 25560 invoked by alias); 9 Jun 1999 15:40:42 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6558 Received: (qmail 25553 invoked from network); 9 Jun 1999 15:40:41 -0000 From: "Bart Schaefer" Message-Id: <990609154030.ZM29919@candle.brasslantern.com> Date: Wed, 9 Jun 1999 15:40:30 +0000 In-Reply-To: <9906090749.AA32816@ibmth.df.unipi.it> Comments: In reply to Peter Stephenson "Re: PATCH: Re: Completion and global aliases" (Jun 9, 9:48am) References: <9906090749.AA32816@ibmth.df.unipi.it> X-Mailer: Z-Mail (5.0.0 30July97) To: "ZSH workers mailing list" Subject: Re: PATCH: Re: Completion and global aliases MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jun 9, 9:48am, Peter Stephenson wrote: } Subject: Re: PATCH: Re: Completion and global aliases } } "Bart Schaefer" wrote: } > The following patch implements `autoload -U ...' for this. Hmm, I didn't } > change `functions' to output anything for "unaliased" state; should it? } } It's hard to know where to put it that isn't going to confuse matters, } either because someone has code to search for `undefined', or because the } next word is taken as the function name, etc. Maybe as long as `functions } -uU' works OK it's good enough. Unfortunately, "functions -uU" can't do the "right" thing because functions with the unaliased flag also have the undefined flag, and scanhashtable() prints nodes that have any of the requested flags (not nodes that have all of them). Maybe the following is OK: Index: Src/builtin.c *************** *** 1846,1851 **** --- 1846,1853 ---- * are given, we will print only functions containing these * * flags, else we'll print them all. */ if (!*argv) { + if (ops['U'] && !ops['u']) + on &= ~PM_UNDEFINED; scanhashtable(shfunctab, 1, on|off, DISABLED, shfunctab->printnode, 0); return 0; } -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com