From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14459 invoked from network); 3 Dec 1998 11:52:33 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 3 Dec 1998 11:52:33 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id GAA15544; Thu, 3 Dec 1998 06:50:28 -0500 (EST) Resent-Date: Thu, 3 Dec 1998 06:50:28 -0500 (EST) Date: Thu, 3 Dec 1998 12:48:46 +0100 (MET) Message-Id: <199812031148.MAA14745@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@math.gatech.edu In-reply-to: "Bart Schaefer"'s message of Mon, 30 Nov 1998 22:28:47 -0800 Subject: Re: Non-intuitive completion Resent-Message-ID: <"XYEB71.0.po3.3idPs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4699 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Bart Schaefer wrote: > ... > > Now, if you'd like to see some REALLY strange behavior, which definitely > IS a bug in my book, try > > zsh% bindkey '^I' expand-or-complete > zsh% setopt nounset > zsh% print $ZSH_* The problem is that docomplete() temporarily sets noerrs=1 around the call to doexpansion(). After some other function calls paramsubst() finally calls zerr() which does nothing if noerrs is set, i.e. it doesn't even set errflag which would be correctly handled in doexpansion(). The patch below fixes the problem by making zerr() set errflag independent of the setting of noerrs. I am far from knowing if this should go there (or in paramsubst() or in prefork(), or in...). Of course setting it at the lowest function in the call chain can have all kinds of nasty side effects. Maybe someone with more experience in zerr() stuff could comment on this (please). Bye Sven *** os/utils.c Thu Dec 3 09:10:46 1998 --- Src/utils.c Thu Dec 3 12:07:49 1998 *************** *** 52,59 **** void zerr(const char *fmt, const char *str, int num) { ! if (errflag || noerrs) return; errflag = 1; trashzle(); /* --- 52,61 ---- void zerr(const char *fmt, const char *str, int num) { ! if (errflag || noerrs) { ! errflag = 1; return; + } errflag = 1; trashzle(); /* -- Sven Wischnowsky wischnow@informatik.hu-berlin.de