zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: zsh-workers@sunsite.dk
Subject: Re: Global aliases, eval, and completion (Re: Expanding interactively aliases)
Date: Tue, 27 Feb 2001 16:51:33 +0000	[thread overview]
Message-ID: <1010227165133.ZM6308@candle.brasslantern.com> (raw)
In-Reply-To: <200102271011.LAA00111@beta.informatik.hu-berlin.de>

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   


  reply	other threads:[~2001-02-27 16:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-27 10:11 Sven Wischnowsky
2001-02-27 16:51 ` Bart Schaefer [this message]
2001-02-27 17:42   ` Bart Schaefer
2001-02-27 17:49   ` Andrej Borsenkow
2001-02-27 18:25     ` Bart Schaefer
  -- strict thread matches above, loose matches on Subject: below --
2001-03-05 13:28 Sven Wischnowsky
2001-02-28  9:10 Sven Wischnowsky
2001-02-26  9:42 Sven Wischnowsky
2001-02-21  8:19 Expanding interactively aliases Sven Wischnowsky
2001-02-26  7:25 ` Global aliases, eval, and completion (Re: Expanding interactively aliases) Bart Schaefer
2001-02-26 16:51   ` Bart Schaefer
2001-02-26 23:03   ` Oliver Kiddle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1010227165133.ZM6308@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).