zsh-users
 help / color / mirror / code / Atom feed
From: Ray Andrews <rayandrews@eastlink.ca>
To: zsh-users@zsh.org
Subject: Re: append to history entry?
Date: Tue, 27 Dec 2016 15:16:08 -0800	[thread overview]
Message-ID: <0a48db86-b41a-283c-8193-e2766aa5d30b@eastlink.ca> (raw)
In-Reply-To: <161227110954.ZM1153@torch.brasslantern.com>

On 27/12/16 11:09 AM, Bart Schaefer wrote:
> Neither, really.  It's a case of gradually accumulating requirements
> on what shells do, rather than any flaw in the original design.
Well, the flaw is just that the additional stuff wasn't anticipated.  
Mind, foretelling the future
can be difficult.

> Seriously, you can't ask for a way to muck with something that is
> normally handled transparently by the shell internals and then gripe
> about having to replicate some of that hidden processing.  Well, you
> can, but it doesn't really help. :-)
Yeah, the chaffing is just because however useful some of that is in 
most situations,
it would be nice to be able to occasionally have a string be just a 
string be just a string
in a C sort of way.  Plain vanilla a literal.  Like my old gripe about a 
command not being
able to know the literal keystrokes that called it *except* that it's 
perfectly literal in history
*except* that if commands are chained with semicolons one can't just 
grab it back from
history for the obvious reason that any given command doesn't know where 
it is in a string
of chained commands -- one would think that one should be able to 
intercept the string
before all the expansions.  So I hafta do all this 'noglob'.  Most of my 
irritations with zsh
are in trying to *stop* it from doing things on occasion.
>
> Daniel is rather dogmatic about handling edge cases that I tend to
> ignore for the sake of not throwing out all the details that make you
> "take it on faith" (a phrase that makes ME grind my teeth whenever you
> write it).
Well, I trust you guys and until I see the logic, I'm just going to take 
your words for it.
There is so much to know.

>
> } One thing tho Bart, it seems it should be 'echo' because when the
> } command line is recalled and executed, the colon throws an error
>
> It shouldn't.  There's no difference between "echo" and ":" except
> that ":" discards its arguments without printing them.  If you're
> getting an error on ":" you've done something else to cause it.
>
> What error?
>
Ah ... seems there must be a space after the colon:


     print -rS -- "rap ${${(q+)@}}; : ${(q-)HOST}"

... that works fine, and doesn't bother with the echo, so it seems to be 
exactly the sort of
thing I'm looking for as to writing to history.  So much to love, 
frustrations or no.


  reply	other threads:[~2016-12-27 23:16 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-26 23:16 Ray Andrews
2016-12-27  1:28 ` Ray Andrews
2016-12-27  4:47   ` Bart Schaefer
     [not found] ` <5288b537-f06a-d18a-60ea-1f962856c80c__41345.3811700039$1482803962$gmane$org@eastlink.ca>
2016-12-27 12:55   ` Daniel Shahaf
2016-12-27 16:00     ` Bart Schaefer
2016-12-27 18:23       ` Ray Andrews
2016-12-27 19:09         ` Bart Schaefer
2016-12-27 23:16           ` Ray Andrews [this message]
2016-12-27 23:55             ` Bart Schaefer
2016-12-28  0:57               ` Ray Andrews
2016-12-28  6:04                 ` Bart Schaefer
2016-12-28 17:39                   ` Ray Andrews
2016-12-28 18:22                     ` Bart Schaefer
2016-12-28 19:20                       ` Ray Andrews
2016-12-28 21:24                         ` Ray Andrews
     [not found]                         ` <3b8fe027-d7fb-25fb-bc05-9ecd3a91b08f__38422.8622112007$1482960347$gmane$org@eastlink.ca>
2016-12-28 23:34                           ` Daniel Shahaf
2016-12-29  0:51                             ` Bart Schaefer
2016-12-29  3:27                             ` Ray Andrews
     [not found]               ` <f87d7f79-3529-d832-eed5-83d4130ea128__16005.139592062$1482888562$gmane$org@eastlink.ca>
2016-12-28  5:28                 ` Daniel Shahaf
2016-12-28  6:31                   ` Bart Schaefer
2016-12-28 16:33                   ` Ray Andrews

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=0a48db86-b41a-283c-8193-e2766aa5d30b@eastlink.ca \
    --to=rayandrews@eastlink.ca \
    --cc=zsh-users@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).