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 20:17:45 -0800 [thread overview]
Message-ID: <f83ae88d-35cc-a742-9ae4-0b59a39f3421@eastlink.ca> (raw)
In-Reply-To: <CAH+w=7a5eCvNQ3QjnoWkC4zQAdxYFy_Q_R-Wn+Oc2zK_yQ_FUQ@mail.gmail.com>
On 2021-02-04 7:22 p.m., Bart Schaefer wrote:
> I've never called what I think you mean anything but the "arguments"
> or "argument list". Unless "tail" means more than that.
Maybe just obsolete culture. I learned that the tail was switches
followed by arguments. But if that's not how we speak now then that's
not how we speak.
>> Anyway, more fiddling: I added " print -lr $@ " to my 'preexec()' and,
>> mirabile dictu, it seems to capture input exactly as typed:
> "Exactly as typed" is going to include the entire (possibly
> multi-line, pipelined, etc.) command input, not just one command. How
> much of that is the "tail"?
Good question. I'll have to wait for the variable to contain something
monstrous and then I'll know what can go wrong. It sure looks good
right now tho.
> noglob _g '*$1*' # Why the duplication?
> RTM?
God no! Seriously I'm reading Peter's introduction finally, then I
might have enough Latin to attempt the manual. You guys don't know how
baffling it is for someone who doesn't already understand it. Worst
thing is just knowing where to look.
> Preexec gets three strings in $@.
>
> $1 is the string seen by the history mechanism
> $2 is is a single-line summary of the command
> $3 contains the full text that is being executed
Excellent, thanks. That's quite marvelous, that level of finesse. I
remember beating my head against that wall when I first got involved.
Turns out to be that simple.
Or more than three:
7 /aWorking/Zsh/Source 3 $ echo $PREV_COMMAND
l g; l f; l s
noglob _l g; noglob _l f; noglob _l s
noglob _l g
noglob _l f
noglob _l s
... very nice.
next prev parent reply other threads:[~2021-02-05 4:18 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
2021-02-05 3:22 ` Bart Schaefer
2021-02-05 4:17 ` Ray Andrews [this message]
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=f83ae88d-35cc-a742-9ae4-0b59a39f3421@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).