zsh-users
 help / color / mirror / code / Atom feed
From: Ray Andrews <rayandrews@eastlink.ca>
To: zsh-users@zsh.org
Subject: Re: array with newlines preserved as literal text
Date: Thu, 4 Feb 2021 13:55:27 -0800	[thread overview]
Message-ID: <b9b5d5b0-acdb-4973-0d65-8cd1be8077f4@eastlink.ca> (raw)
In-Reply-To: <CAH+w=7ahFjRqBYVQ=G517FbWosQCoUuHeLB+osuHEMtpeCymtg@mail.gmail.com>

On 2021-02-03 1:19 p.m., Bart Schaefer wrote:

  print -rv REPLY ...
> or whatever other variable you want (it will be a string, not an array).
>
> The phrase "its tail" still leaves me slightly doubtful.
>
Isn't 'tail' the normal term for whatever follows a command? I learned 
it as 'command tail' back in the day.

Anyway, more fiddling: I added " print -lr $@ " to my 'preexec()' and, 
mirabile dictu, it seems to capture input exactly as typed:

3 /aWorking/Zsh/Source/Wk 3 $ g '*$1*'
g '*$1*'
noglob _g '*$1*'  # 'g' is the alias that calls '_g' so that's 
understandable.
noglob _g '*$1*'  # Why the duplication?

... various tests show nothing expanded.  One thing tho, why the 
duplicate line?  In one case:

3 /aWorking/Zsh/Source/Wk 3 $ s g tiny bug 'grep -' line 88
s g tiny bug 'grep -' line 88
s g tiny bug 'grep -' line 88
s g tiny bug 'grep -' line 88

... three times?   And 's' is not an alias, that function goes straight 
in.  But here is my capture point for the literal command as it is 
typed, it seems.  "print ,lrv LAST_COMMAND $1  " and I'm good, the first 
line seems always correct.





  parent reply	other threads:[~2021-02-04 21:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-02 19:16 Ray Andrews
2021-02-02 19:26 ` Roman Perepelitsa
2021-02-03  1:10   ` Ray Andrews
2021-02-02 20:25 ` Bart Schaefer
2021-02-02 23:31   ` Ray Andrews
2021-02-03  2:21     ` Bart Schaefer
2021-02-03 19:29       ` Ray Andrews
2021-02-03 21:19         ` Bart Schaefer
2021-02-04  2:07           ` Ray Andrews
2021-02-05  2:57             ` Bart Schaefer
2021-02-04 21:55           ` Ray Andrews [this message]
2021-02-05  3:22             ` Bart Schaefer
2021-02-05  4:17               ` Ray Andrews
2021-02-05  4:24                 ` 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=b9b5d5b0-acdb-4973-0d65-8cd1be8077f4@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).