From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3125 invoked from network); 22 Oct 2000 02:28:01 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 22 Oct 2000 02:28:01 -0000 Received: (qmail 19841 invoked by alias); 22 Oct 2000 02:27:56 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13057 Received: (qmail 19832 invoked from network); 22 Oct 2000 02:27:53 -0000 From: "Bart Schaefer" Message-Id: <1001022022745.ZM10431@candle.brasslantern.com> Date: Sun, 22 Oct 2000 02:27:44 +0000 X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.auc.dk Subject: PATCH: More vared repairs MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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