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

Re: prexec never gets empty string?



On Fri, Feb 13, 2015 at 6:19 PM, Derek Gleim <mail@xxxxxxxxxxx> wrote:
> 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

I certainly would never want preexec to be disabled just because a
line isn't stored in history.

-- 
Mikael Magnusson



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