From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21440 invoked from network); 27 Feb 2001 16:51:53 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 27 Feb 2001 16:51:53 -0000 Received: (qmail 24527 invoked by alias); 27 Feb 2001 16:51:48 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13545 Received: (qmail 24516 invoked from network); 27 Feb 2001 16:51:47 -0000 From: "Bart Schaefer" Message-Id: <1010227165133.ZM6308@candle.brasslantern.com> Date: Tue, 27 Feb 2001 16:51:33 +0000 In-Reply-To: <200102271011.LAA00111@beta.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "Re: Global aliases, eval, and completion (Re: Expanding interactively aliases)" (Feb 27, 11:11am) References: <200102271011.LAA00111@beta.informatik.hu-berlin.de> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.dk Subject: Re: Global aliases, eval, and completion (Re: Expanding interactively aliases) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Feb 27, 11:11am, Sven Wischnowsky wrote: } Subject: Re: Global aliases, eval, and completion (Re: Expanding interacti } } Hmhm. Haven't looked through the completion functions yet, but below } is a patch to replace the (internal) `noaliases' with an option `ALIAS'. } Should I commit that? I'd have left the internal `noaliases' as it was, and then tested the option in these two places: } @@ -1556,8 +1551,8 @@ } } if (tok == STRING) { } /* Check for an alias */ } - an = noaliases ? NULL : } - (Alias) aliastab->getnode(aliastab, yytext); } + an = opts[ALIASOPT] ? } + (Alias) aliastab->getnode(aliastab, yytext) : NULL; } if (an && !an->inuse && ((an->flags & ALIAS_GLOBAL) || incmdpos || } inalmore)) { } inpush(an->text, INP_ALIAS, an); } @@ -976,7 +977,7 @@ } } /* This global flag is used to signal the lexer code if it should * } * expand aliases or not. */ } - noaliases = isset(COMPLETEALIASES); } + opts[ALIASOPT] = !isset(COMPLETEALIASES); } } /* Find out if we are somewhere in a `string', i.e. inside '...', * } * "...", `...`, or ((...)). Nowadays this is only used to find * There's no reason to flip the sense of the option when the code internally wants to disable aliases, nor as far as I can tell any reason to allow the option to be enabled by user code when the internals have disabled it. } Should it (in options.c) use (OPT_ALL & ~OPT_SH) instead of OPT_ALL? Turning off aliases when emulating sh sounds like the right thing to me. -- 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