zsh-workers
 help / color / mirror / code / Atom feed
From: Wayne Davison <wayned@users.sourceforge.net>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh Workers <zsh-workers@zsh.org>
Subject: Re: !!$ unitialized at first prompt
Date: Sat, 25 Sep 2010 10:26:28 -0700	[thread overview]
Message-ID: <AANLkTik5sOqcwHHh_Qu6E8qPuTUknngK7mZEa-_i-+ar@mail.gmail.com> (raw)
In-Reply-To: <100924235332.ZM5186@torch.brasslantern.com>

[-- Attachment #1: Type: text/plain, Size: 1231 bytes --]

It might be nice to introduce a new history format that would indicate the
word splitting in a simple manner.  One possibility is to output all spaces
inside a word as some other sequence of characters.  If the new encoding
were indicated in the prefixed extended-history header, the parsing code
would know if it should split the line based on the new, simple decoder or
the old-style parser.  One complicating factor is a syntax that splits into
separate words without intervening spaces.  To deal with that we'd either
need a character sequence to indicate this, or we'd need to still run the
line through the parser before decoding the words.

Here's one possible encoding would use URI encoding to fully encode all the
history semantics of the line.  I'm indicating its presence with a ":%" in
the prefix, like this:

: 1226351062:0:%;cat file%20name%20with%20spaces%20(100%25)
>%00/tmp/file%20name

In the above, I indicated a word-split that didn't have a space with a null
(%00), so the above is 4 words.  The idea is to come up with an encoding
that directly translates between the internal representation and a hist-text
representation.  Would we need more encoding rules?  Maybe something for
metafied chars?

..wayne..

  reply	other threads:[~2010-09-25 17:33 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
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 [this message]
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=AANLkTik5sOqcwHHh_Qu6E8qPuTUknngK7mZEa-_i-+ar@mail.gmail.com \
    --to=wayned@users.sourceforge.net \
    --cc=schaefer@brasslantern.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).