Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: A different approach to PROMPT_CR
- X-seq: zsh-workers 12706
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: Zefram <zefram@xxxxxxxx>
- Subject: Re: A different approach to PROMPT_CR
- Date: Sat, 26 Aug 2000 22:27:00 +0000
- Cc: zsh-workers@xxxxxxxxxxxxxx
- In-reply-to: <E13Smqp-0004ua-00@xxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <E13Smqp-0004ua-00@xxxxxxxxxxxxxxxxxx>
On Aug 26, 9:46pm, Zefram wrote:
} Subject: Re: A different approach to PROMPT_CR
}
} This will eat any typeahead. Actually, if an "R" is typed ahead it'll
} get confused.
Hmm, what will "stty -echo" do to typeahead?
Would it suffice to insert
if read -t -k 1
then
print -z $REPLY
return 0
fi
before the stty call?
It might be nice if "read -t -k 0" simply returned 0 if there's pending
input and 1 otherwise, without reading anything. Right now, -k 0 is
treated the same as -k 1 (read always reads at least one byte).
--
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author