Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
prexec never gets empty string?
- X-seq: zsh-workers 34531
- From: Derek Gleim <mail@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: prexec never gets empty string?
- Date: Fri, 13 Feb 2015 11:19:42 -0600
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Sender: webmaster@xxxxxxxxxxx
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author