From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: More vared repairs
Date: Sun, 22 Oct 2000 02:27:44 +0000 [thread overview]
Message-ID: <1001022022745.ZM10431@candle.brasslantern.com> (raw)
The -e option, added in zsh-workers/9396 but never mentioned in ChangeLog,
didn't do the right thing in combination with -h, because the call to
hbegin() (also added in 9396) also sets `isfirstln = 1'. In other words,
using -h always implied -e, which probably was not the desired effect.
It further doesn't seem to me that vared should ever pay attention to the
setting of IGNOREEOF. If you don't use -e, you can't generate an EOF in
any case, and if you use -e you've asked for EOF behavior.
Index: Src/Zle/zle_main.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_main.c,v
retrieving revision 1.12
diff -u -r1.12 zle_main.c
--- Src/Zle/zle_main.c 2000/10/21 03:15:36 1.12
+++ Src/Zle/zle_main.c 2000/10/22 02:26:39
@@ -748,7 +748,7 @@
struct value vbuf;
Value v;
Param pm = 0;
- int create = 0, ifl;
+ int create = 0, ifl, ieof;
int type = PM_SCALAR, obreaks = breaks, haso = 0;
char *p1 = NULL, *p2 = NULL;
FILE *oshout = NULL;
@@ -900,11 +900,13 @@
varedarg = *args;
ifl = isfirstln;
- if (ops['e'])
- isfirstln = 1;
if (ops['h'])
hbegin(2);
+ isfirstln = ops['e'];
+ ieof = opts[IGNOREEOF];
+ opts[IGNOREEOF] = 0;
t = (char *) zleread(p1, p2, ops['h'] ? ZLRF_HISTORY : 0);
+ opts[IGNOREEOF] = ieof;
if (ops['h'])
hend(NULL);
isfirstln = ifl;
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
reply other threads:[~2000-10-22 2:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1001022022745.ZM10431@candle.brasslantern.com \
--to=schaefer@candle.brasslantern.com \
--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).