zsh-workers
 help / color / mirror / code / Atom feed
* prexec never gets empty string?
@ 2015-02-13 17:19 Derek Gleim
  2015-02-13 17:35 ` Peter Stephenson
  2015-02-13 22:16 ` Mikael Magnusson
  0 siblings, 2 replies; 13+ messages in thread
From: Derek Gleim @ 2015-02-13 17:19 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 945 bytes --]

Am I misunderstanding the docs, or is this a bug?

> If the history mechanism is active (and the line was not discarded from
the history buffer), the string that the user typed is passed as the first
argument, otherwise it is an empty string.

Yet, whether I "discard" (as I understand it) a command because of
histnostore, histignorespace, histnodups, or by returning non-zero from
zshaddhistory(), I never get an empty string as the first argument in
preexec().

That is:

    % setopt histignorespace
    % preexec() { echo $1 }
    %   true ignore me
     true ignore me

zsh 5.0.2 (x86_64-pc-linux-gnu)
Ubuntu 14.04.1

By the way, for me this is related to a question I had opened
<http://superuser.com/questions/877206/zsh-prompts-history-number-sometimes-increments-after-ignored-commands>
on Stack Overflow, trying to get the prompt expansion `%!` to truly be "the
number that is to be assigned to the next command".

Thanks in advance.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-02-17 17:10 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-13 17:19 prexec never gets empty string? Derek Gleim
2015-02-13 17:35 ` Peter Stephenson
2015-02-13 19:27   ` Derek Gleim
2015-02-13 20:19   ` Peter Stephenson
2015-02-13 22:16 ` Mikael Magnusson
2015-02-13 22:41   ` Derek Gleim
2015-02-13 23:04     ` Mikael Magnusson
2015-02-13 23:14       ` Mikael Magnusson
2015-02-14 21:37     ` Peter Stephenson
2015-02-16 15:11       ` Derek Gleim
2015-02-16 15:16         ` Derek Gleim
2015-02-16 15:59         ` Peter Stephenson
2015-02-17 17:09         ` Bart Schaefer

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).