zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Tanaka Akira <akr@jaist.ac.jp>, zsh-workers@sunsite.auc.dk
Subject: Re: unsetopt banghist does not work.
Date: Sat, 31 Jul 1999 04:41:25 +0000	[thread overview]
Message-ID: <990731044125.ZM1287@candle.brasslantern.com> (raw)
In-Reply-To: <rsqn1wezaao.fsf@crane.jaist.ac.jp>

On Jul 30,  7:44pm, Tanaka Akira wrote:
} Subject: Re: unsetopt banghist does not work.
}
} In article <9907300846.AA31025@ibmth.df.unipi.it>,
}   Peter Stephenson <pws@ibmth.df.unipi.it> writes:
} > I suppose I'm going to be told the following is just how history is
} > supposed to work?
} > 
} >   % unsetopt banghist
} >   % echo !!
} >   !!
} >   % setopt banghist
} >   % !!
} >   zsh: no such word in event
} 
} This behaviour is different to zsh-3.1.5-pws-21 and zsh-3.1.5.

The problem is with this change:

  Sven: 6542, 6551: Don't buffer in the history code any text that won't
  be added to the history.

This was done to speed up sourcing of files and execution of functions, but
it has the side-effect of causing the history to be discarded completely
when NOBANGHIST is in effect; or at least it has that effect when combined
with PWS's patch of 7324.  Obviously this is unacceptable -- it means that
"unsetopt banghist" also disables the zle history operations.

I think the following is the right fix.  It goes on top of 7324.  There
probably ought to be some #define constants for this instead of numbers.

Index: Src/hist.c
===================================================================
@@ -722,7 +722,7 @@
 	hwend = ihwend;
 	addtoline = iaddtoline;
 	if (!isset(BANGHIST))
-	    stophist = 2;
+	    stophist = 4;
     }
     chwordpos = 0;
 

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


  reply	other threads:[~1999-07-31  4:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-07-30  7:58 Tanaka Akira
1999-07-30  8:46 ` Peter Stephenson
1999-07-30 10:44   ` Tanaka Akira
1999-07-31  4:41     ` Bart Schaefer [this message]
1999-07-31  4:47       ` 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=990731044125.ZM1287@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=akr@jaist.ac.jp \
    --cc=zsh-workers@sunsite.auc.dk \
    /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).