Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: array with newlines preserved as literal text
- X-seq: zsh-users 26458
- From: Ray Andrews <rayandrews@xxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: array with newlines preserved as literal text
- Date: Thu, 4 Feb 2021 13:55:27 -0800
- Archived-at: <https://zsh.org/users/26458>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-users/2021-02/b9b5d5b0-acdb-4973-0d65-8cd1be8077f4%40eastlink.ca>
- In-reply-to: <CAH+w=7ahFjRqBYVQ=G517FbWosQCoUuHeLB+osuHEMtpeCymtg@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <52dba8e4-2538-7c96-ecd5-66e017ab2b8e@eastlink.ca> <CAH+w=7bAZKawy_BfTMGzuCm96NB=gDA6R-K9aZBd4N+uOOT-=A@mail.gmail.com> <36596ab3-14b6-da57-e40b-3e66d9ffbb5a@eastlink.ca> <CAH+w=7ZWs4ataEtKK+SQraA4dfisPFkagvqbr48jZKL_HwQV6g@mail.gmail.com> <a6cca928-6494-86d1-bf01-873c1fe6e6e3@eastlink.ca> <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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author