Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: array with newlines preserved as literal text



On Thu, Feb 4, 2021 at 1:55 PM Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
>
> Isn't 'tail' the normal term for whatever follows a command? I learned
> it as 'command tail' back in the day.

I've never called what I think you mean anything but the "arguments"
or "argument list".  Unless "tail" means more than that.

> 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"?

> noglob _g '*$1*'  # Why the duplication?

RTM?  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

Note, $1 will be empty when history is disabled.




Messages sorted by: Reverse Date, Date, Thread, Author