zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@zsh.org (Zsh hackers list)
Subject: Re: PATCH: print -S uses lexical history
Date: Wed, 1 Jun 2011 19:45:02 +0100	[thread overview]
Message-ID: <20110601194502.2c59c403@pws-pc.ntlworld.com> (raw)
In-Reply-To: <110531232436.ZM11353@torch.brasslantern.com>

On Tue, 31 May 2011 23:24:36 -0700
Bart Schaefer <schaefer@brasslantern.com> wrote:
> On May 31,  9:37pm, Peter Stephenson wrote:
> }
> } As we've had all the pain of the HIST_LEX_WORDS option, which almost no
> } one is using, to split a history line into words using the lexical
> } analyser, it's worth making this available directly using a relative of
> } "print -s" imaginatively called "print -S".
> 
> This is nice, but I have to ask ... why not just make the behavior of
> "print -s" dependend on the current setting of the option?  In what
> circumstances would one wish to (be able to choose at the level of
> individual commands to) have part of the history in lexed form and
> part of it not?

"print -s" allows you to pick your own words; the different arguments
become the words in the history.  "print -S", on the other hand, takes a
single argument which is the entire command line that will be split.  It
didn't seem appropriate to me to change the behaviour of "print -s" to
do automatic splitting.

What would be a bit neater would be to be able to have the option for an
option, i.e. -s with a variant rather than a completely separate
option.  But we don't have anything like that.

-- 
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/


      reply	other threads:[~2011-06-01 19:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-31 20:37 Peter Stephenson
2011-06-01  6:24 ` Bart Schaefer
2011-06-01 18:45   ` Peter Stephenson [this message]

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=20110601194502.2c59c403@pws-pc.ntlworld.com \
    --to=p.w.stephenson@ntlworld.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).