Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug with hist_ignore_space
- X-seq: zsh-workers 16059
- From: Wayne Davison <wayned@xxxxxxxxxxxxxxxxxxxxx>
- To: Geoff Wing <mason@xxxxxxxxxxxxxxx>
- Subject: Re: Bug with hist_ignore_space
- Date: Mon, 15 Oct 2001 11:39:15 -0700 (PDT)
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <9q66g3$5vh$1@xxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
On Fri, 12 Oct 2001, Geoff Wing wrote:
> what's up with hist_ignore_space at the moment? Commands
> with spaces at the start are staying in history past the
> one more command limit and are also being written to HISTFILE
Only interactive comments were doing this. Turns out that a comment
has its Eprog set to NULL, and should_ignore_line() didn't realize
that this could still represent something it needed to check. Here's
the patch.
..wayne..
---8<------8<------8<------8<---cut here--->8------>8------>8------>8---
Index: Src/hist.c
--- Src/hist.c 2001/09/24 15:15:08 1.34
+++ Src/hist.c 2001/10/15 18:34:04
@@ -971,13 +971,13 @@
static int
should_ignore_line(Eprog prog)
{
- if (!prog)
- return 0;
-
if (isset(HISTIGNORESPACE)) {
if (*chline == ' ' || aliasspaceflag)
return 1;
}
+
+ if (!prog)
+ return 0;
if (isset(HISTNOFUNCTIONS)) {
Wordcode pc = prog->prog;
---8<------8<------8<------8<---cut here--->8------>8------>8------>8---
Messages sorted by:
Reverse Date,
Date,
Thread,
Author