zsh-workers
 help / color / mirror / code / Atom feed
From: Richard Coleman <coleman@math.gatech.edu>
To: zsh-workers@math.gatech.edu
Subject: Re: Reserved words and aliases
Date: Thu, 25 May 1995 19:58:18 -0400	[thread overview]
Message-ID: <9505252358.AA29229@redwood.skiles.gatech.edu> (raw)
In-Reply-To: Your message of "Thu, 25 May 1995 14:05:30 BST." <553.9505251305@pyro.swan.ac.uk>

> The problem is a Z-shell Kludge (TM):  the aliases and reserved words
> shared the same hash table.  The old behaviour was that making exec
> an alias stopped the real exec from being recognised as a shell
> reserved word and this couldn't be undone.
> 
> I could have fixed this by compounding the kludge, e.g. by adding an
> extra flag if an alias was a reserved word that was aliased.  Instead
> I decided to do it properly and put the reserved words in their own
> hash table.  This enabled some minor data size optimisations at the
> expense of some minor code increase.  It also opens the way in future
> to turn off aliases as an option if that ever becomes necessary.

Totally excellent!  I think there are some other tables that probably
should be split like this.

> There is the odd minor but reasonable change in behaviour, for example
> compctl's alias flag won't produce reserved words any more (they still
> appear for command completion and spell checking).

I guess we will need (yet another) flag to match reserved words.  I
consider that a small price to pay for this particular cleanup.

> You can now do
> 
> % alias exec="((SHLVL++, SAVEHIST=0)); exec"
> 
> if you really want.

I'm not sure why you would want to do this, but it's cool that
it will be possible.

rc


  reply	other threads:[~1995-05-26  0:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-05-25 13:05 P.Stephenson
1995-05-25 23:58 ` Richard Coleman [this message]
     [not found]   ` <coleman@math.gatech.edu>
1995-05-26  0:49     ` Barton E. Schaefer
     [not found] <9505260442.AA02643@redwood.skiles.gatech.edu>
1995-05-26  9:44 ` reserved " P.Stephenson

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=9505252358.AA29229@redwood.skiles.gatech.edu \
    --to=coleman@math.gatech.edu \
    --cc=zsh-workers@math.gatech.edu \
    /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).