zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@math.gatech.edu
Subject: Re: Non-intuitive completion
Date: Thu, 3 Dec 1998 12:48:46 +0100 (MET)	[thread overview]
Message-ID: <199812031148.MAA14745@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Bart Schaefer"'s message of Mon, 30 Nov 1998 22:28:47 -0800


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_*<TAB>

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


             reply	other threads:[~1998-12-03 11:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-03 11:48 Sven Wischnowsky [this message]
1999-03-13 17:26 ` Bart Schaefer
  -- strict thread matches above, loose matches on Subject: below --
1999-03-15 10:06 Sven Wischnowsky
1998-12-01  2:47 Phil Pennock
1998-12-01  6:28 ` 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=199812031148.MAA14745@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@math.gatech.edu \
    /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).