From: Mikael Magnusson <mikachu@gmail.com>
To: Derek Gleim <mail@dcgleim.com>
Cc: zsh workers <zsh-workers@zsh.org>
Subject: Re: prexec never gets empty string?
Date: Fri, 13 Feb 2015 23:16:02 +0100 [thread overview]
Message-ID: <CAHYJk3RKv8bZUy-DS3-QWZ6ykRRZejrF0Wwpwa=wdA1-1HCNZw@mail.gmail.com> (raw)
In-Reply-To: <CADS3xe8na+zBiEMT1qp+pjLXtDxzvRmC7QVjCt5VXSUu_1jbmA@mail.gmail.com>
On Fri, Feb 13, 2015 at 6:19 PM, Derek Gleim <mail@dcgleim.com> 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
next prev parent reply other threads:[~2015-02-13 22:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-13 17:19 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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAHYJk3RKv8bZUy-DS3-QWZ6ykRRZejrF0Wwpwa=wdA1-1HCNZw@mail.gmail.com' \
--to=mikachu@gmail.com \
--cc=mail@dcgleim.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).