From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@sunsite.dk
Subject: Re: precmd() affecting the "r" command output
Date: Sun, 12 Jun 2005 19:39:13 +0000 [thread overview]
Message-ID: <1050612193913.ZM4787@candle.brasslantern.com> (raw)
In-Reply-To: <20050612170529.GA10725@clipper.ens.fr>
On Jun 12, 7:05pm, Josselin Noirel wrote:
} Subject: precmd() affecting the "r" command output
}
} precmd() is supposed to be executed once before each prompt (according
} to the man page) but here it is executed one more time, when "r" is
} executed.
I'm surprised no one has ever noticed this before (it's been happening
this way for *years*), but I think this is what's needed:
Index: Src/init.c
===================================================================
RCS file: /extra/cvsroot/zsh/zsh-4.0/Src/init.c,v
retrieving revision 1.20
diff -c -r1.20 init.c
--- Src/init.c 14 Apr 2005 04:33:51 -0000 1.20
+++ Src/init.c 12 Jun 2005 19:34:24 -0000
@@ -112,7 +112,7 @@
hbegin(1); /* init history mech */
if (isset(SHINSTDIN)) {
setblock_stdin();
- if (interact) {
+ if (interact && toplevel) {
int hstop = stophist;
stophist = 3;
preprompt();
prev parent reply other threads:[~2005-06-12 19:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-12 17:05 Josselin Noirel
2005-06-12 19:39 ` Bart Schaefer [this message]
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=1050612193913.ZM4787@candle.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@sunsite.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).