Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Problem with early key strokes at startup
- X-seq: zsh-users 22520
- From: Sebastian Gniazdowski <psprint3@xxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, zsh-users@xxxxxxx
- Subject: Re: Problem with early key strokes at startup
- Date: Tue, 28 Feb 2017 22:28:07 -0800
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=hbrgXrjSKI+sGVBUcXb17HWFjw E=; b=qQEM/7DhhtmdFJQWp3uJHxrL6ekSM0Pq/YC1Jp8eOHaBQGx/40tlDw+ZKT ReqdYHZhSjhYoyakT7WogJLK5J8xpKAEfRUewH2092tC9z12MdUCqwz20f4BkbM8 lSC1J3Fr7d337f6vFlXXZ9CI5DPRW0vLR5XAayypdByZIuk2M=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=smtpout; bh=hb rgXrjSKI+sGVBUcXb17HWFjwE=; b=DYf2F892u0LdBsYdvZOs5GaiBdRbDwAsUX u89xppo+jJHrrHnE0/vdqYg9A7WhCuYucWpH8q/Q6frPZQ55F83dwP/fRHZWun6q CY4eNB6j6ELWE/8ek+V4fzK3XEzcE/jcHHZAY2YMLufkikbIjdTZfUX6nO5BwRNm HH3QP3ypE=
- In-reply-to: <170228131618.ZM8208@torch.brasslantern.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <1488277394.2867401.895300784.0A2F382A@webmail.messagingengine.com> <170228131618.ZM8208@torch.brasslantern.com>
On Tue, Feb 28, 2017, at 01:16 PM, Bart Schaefer wrote:
> On Feb 28, 2:23am, Sebastian Gniazdowski wrote:
> }
> } when I startup zsh to just run a tool with Ctrl-O Ctrl-P, I get "^P" or
> } "^O^P" printed instead:
> }
> } Maybe it's easy to fix?
>
> Unfortunately not. Typeahead (characters present on stdin before the
> shell is ready to read them) is exceptionally difficult to deal with
> in a portable way. There are several lengthy comments about this in
> the C code in shell startup and zle.
I'm thinking about some minimum effort try. Looked for some
initialization via "ack stty\|STTY" but didn't find it. Would move/copy
it earlier to main, that's all. Maybe it's even the case that needed
initialization is in zle module, it would fire little late then
probably.
> In this specific case, the problem is likely ctrl-O. If you look at
> output of "stty -a" you'll probably find ^O bound to something called
> "flush" which is annoyingly undocumented but means to throw away all
> previous input that has not already been read by whatever is connected
> to the TTY device. This is likely being seen and intepreted by the
> terminal driver before zsh has a chance to change the state to "raw"
> input, and there's absolutely nothing we can do about *that*.
I have:
cchars: discard = <undef>; dsusp = <undef>; eof = ^D; eol = <undef>;
eol2 = <undef>; erase = ^?; intr = ^C; kill = ^U;
lnext = <undef>; min = 1; quit = <undef>; reprint = ^R;
start = ^Q; status = ^T; stop = ^S; susp = <undef>; time = 0;
werase = ^W;
--
Sebastian Gniazdowski
psprint3@xxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author