zsh-workers
 help / color / mirror / code / Atom feed
* Bug with hist_ignore_space
@ 2001-10-12  7:35 Geoff Wing
  2001-10-15 18:39 ` Wayne Davison
  0 siblings, 1 reply; 2+ messages in thread
From: Geoff Wing @ 2001-10-12  7:35 UTC (permalink / raw)
  To: zsh-workers

Heyla,
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

% zsh 
% echo $ZSH_VERSION
4.1.0-dev-2
% setopt | fgrep histignorespace
histignorespace       on
%   # foo     Ive got interactivecomments on too
% exit
% zsh
%   # foo
% # bar maybe we need another command to push it out of history
% exit
% tail -6 ~/.history
setopt | fgrep histignorespace
  # foo     Ive got interactivecomments on too
exit
  # foo
# bar maybe we need another command to push it out of history
exit
%


Regards,
-- 
Geoff Wing  <gcw@pobox.com>
rxvt stuff  <gcw@rxvt.org>
zsh stuff   <gcw@zsh.org>


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

* Re: Bug with hist_ignore_space
  2001-10-12  7:35 Bug with hist_ignore_space Geoff Wing
@ 2001-10-15 18:39 ` Wayne Davison
  0 siblings, 0 replies; 2+ messages in thread
From: Wayne Davison @ 2001-10-15 18:39 UTC (permalink / raw)
  To: Geoff Wing; +Cc: zsh-workers

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


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

end of thread, other threads:[~2001-10-15 18:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-12  7:35 Bug with hist_ignore_space Geoff Wing
2001-10-15 18:39 ` Wayne Davison

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