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

Re: prexec never gets empty string?



On Fri, 13 Feb 2015 16:41:24 -0600
Derek Gleim <mail@xxxxxxxxxxx> wrote:
> > I certainly would never want preexec to be disabled just because a
> line isn't stored in history.
> 
> I don't follow.  Me neither.  My understanding is if the line isn't going to
> be stored, preexec is still called, but it is supposed to be given an empty
> string as the first argument when the command will be ignored by history
> (while the second and third arguments give you the command regardless). No?

Sorry, no.  I was misunderstanding completely --- I thought your error
was that spaces were wrong in the line that was being output.

As Mikael says, it's certainly not the case that preexec is supposed to
veto lines based on the history.  It's purpose is unrelated to the
recording of history: it's there to pass information about the line
about to be executed.

pws



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