zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <Peter.Stephenson@csr.com>
To: Zsh Workers <zsh-workers@zsh.org>
Subject: Re: !!$ unitialized at first prompt
Date: Fri, 24 Sep 2010 15:26:18 +0100	[thread overview]
Message-ID: <20100924152618.036db8d0@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <alpine.LNX.2.01.1009241014290.4754@hp>

On Fri, 24 Sep 2010 10:18:23 -0400 (EDT)
"Benjamin R. Haskell" <zsh@benizi.com> wrote:
> On Fri, 24 Sep 2010, Peter Stephenson wrote:
> 
> > The shell doesn't split words in the same way when importing
> > history. In normal operation it relies on the lines having been
> > passed through the lexical analyser to generate the words, which
> > doesn't happen when history is read from a file.  Instead it just
> > blindly splits on whitespace.
> 
> Interesting.
> 
> I'm surprised it splits the history when it's read in.  (I would've 
> expected it to read in whole command lines and only split into words 
> when necessary.)

There isn't a "when necessary", exactly: what's recorded in the history
list are the word pointers, which is what you get for free (well, OK, for
me spending a few hours a few years ago improving the mechanism, which used
to record words in a slightly messier way) when they've come from "live"
history.  So, without adding additional complexity, doing it on reading in
is the only sensible place in the other case (what it happens to do at that
point is a different matter but if you've seen the completion system you'll
realise interfacing to the lexical analyser just to split up words isn't
much fun with our current implementation).

-- 
Peter Stephenson <pws@csr.com>            Software Engineer
Tel: +44 (0)1223 692070                   Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom


  reply	other threads:[~2010-09-24 14:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-24  4:36 Benjamin R. Haskell
2010-09-24  4:43 ` Benjamin R. Haskell
2010-09-24 11:48   ` Mikael Magnusson
2010-09-24 12:39     ` Peter Stephenson
2010-09-24 14:18       ` Benjamin R. Haskell
2010-09-24 14:26         ` Peter Stephenson [this message]
2010-09-24 15:30           ` Bart Schaefer
2010-09-24 15:10       ` Bart Schaefer
2010-09-24 15:20         ` Mikael Magnusson
2010-09-24 20:12         ` Peter Stephenson
2010-09-25  6:53           ` Bart Schaefer
2010-09-25 17:26             ` Wayne Davison
2010-09-25 18:49               ` Peter Stephenson
2010-09-26  1:14                 ` Bart Schaefer

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=20100924152618.036db8d0@pwslap01u.europe.root.pri \
    --to=peter.stephenson@csr.com \
    --cc=zsh-workers@zsh.org \
    /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).