zsh-workers
 help / color / mirror / code / Atom feed
From: Bernd Eggink <eggink@uni-hamburg.de>
To: zsh Workers <zsh-workers@math.gatech.edu>
Subject: Re: typeahead problem
Date: Tue, 08 Dec 1998 19:38:53 +0100	[thread overview]
Message-ID: <366D723D.A710FD4E@uni-hamburg.de> (raw)
In-Reply-To: <981208100629.ZM6018@candle.brasslantern.com>

Bart Schaefer wrote:
 
> The question is which of those two cases `read -q` should emulate.  The
> decision made was to treat it like spell checking, leaving the typeahead
> alone when possible so that other commands may consume it.  

IMHO this decision was wrong, but it's probabely too late now. The
situation when I noticed that behaviour was in a loop consisting of
about 100 successive 'read -q' queries. ONE false move, and ALL
remaining questions get the answer 'no'. This can have very harmful
consequences, whereas not being able to type something in advance for
the next command is just a minor inconvenience.

> The way you
> get the "always consume one character" behavior is to use
> 
>         read -k1 "REPLY?Yes or no: " && do_something

Hm, no. You have to write something like

	typeset -u REPLY
	read -k1 "REPLY?Yes or no: "
	[[ $REPLY == Y ]] && do_something

But apart from that you're right, of course.

Regards,
Bernd 

--
Bernd Eggink
Regionales Rechenzentrum der Uni Hamburg
eggink@uni-hamburg.de
http://www.rrz.uni-hamburg.de/eggink/BEggink.html


  parent reply	other threads:[~1998-12-08 18:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-08 12:38 Bernd Eggink
1998-12-08 13:01 ` Andrej Borsenkow
1998-12-08 14:07   ` Bernd Eggink
1998-12-08 14:30     ` Andrej Borsenkow
1998-12-08 15:08       ` Bernd Eggink
1998-12-08 15:54         ` Andrej Borsenkow
1998-12-08 17:39           ` Bernd Eggink
1998-12-08 18:06           ` Bart Schaefer
1998-12-08 18:38             ` Andrej Borsenkow
1998-12-08 18:38             ` Bernd Eggink [this message]
1998-12-08 21:22               ` 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=366D723D.A710FD4E@uni-hamburg.de \
    --to=eggink@uni-hamburg.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).