From: Roman Perepelitsa <roman.perepelitsa@gmail.com>
To: Ray Andrews <rayandrews@eastlink.ca>
Cc: zsh-users@zsh.org
Subject: Re: one time in 20 error
Date: Mon, 28 Nov 2022 21:46:45 +0100 [thread overview]
Message-ID: <CAN=4vMoG8UmeQwkQNJtXq_=q0mky1tdHHqDzW8DxNTyJDON+oQ@mail.gmail.com> (raw)
In-Reply-To: <24954aa2-8ca5-b946-e875-1309cf46e007@eastlink.ca>
On Mon, Nov 28, 2022 at 9:34 PM Ray Andrews <rayandrews@eastlink.ca> wrote:
>
> On 2022-11-28 09:54, Roman Perepelitsa wrote:
> >
> > This might be a response by the TTY to a query that your script has
> > sent to it. Basically, if the script queries the TTY and exits before
> > reading the response, then the response goes to zle and you see this
> > kind of garbage on the command line.
> >
> > ^[[<0;24;4m is a CSI sequence. I don't remember its meaning from the
> > top of my head.
>
> I thought it might be something of that general nature. I wonder, is
> there some strategic place where I might put a 'sleep' to let things
> sort themselves out? Probably only would take a millisecond or two.
You can try this:
() {
zmodload zsh/system
local REPLY
while sysread -t 0.1; do done
}
This reminds me of a student in a C programming class who was
frustrated by the pesky "core dumped" message printed after his
program succeeded. He redirected stderr to /dev/null
and--Voilà--problem solved!
The teacher wasn't convinced by this "solution" and neither should you.
Roman.
next prev parent reply other threads:[~2022-11-28 20:47 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-28 17:40 Ray Andrews
2022-11-28 17:54 ` Roman Perepelitsa
2022-11-28 20:34 ` Ray Andrews
2022-11-28 20:46 ` Roman Perepelitsa [this message]
2022-11-28 22:16 ` Ray Andrews
2022-11-28 22:24 ` Roman Perepelitsa
2022-11-28 23:18 ` Ray Andrews
2022-11-29 2:48 ` Risto Laitinen
2022-11-29 3:27 ` Ray Andrews
2022-11-29 10:13 ` Roman Perepelitsa
2022-11-29 13:29 ` Ray Andrews
2022-11-30 4:32 ` Bart Schaefer
2022-11-30 13:56 ` Ray Andrews
2022-11-30 14:10 ` Roman Perepelitsa
2022-11-30 20:23 ` Ray Andrews
2022-11-30 23:17 ` Ray Andrews
2022-11-30 23:46 ` Bart Schaefer
2022-12-01 0:03 ` Bart Schaefer
2022-12-01 3:20 ` Ray Andrews
2022-12-01 9:19 ` Roman Perepelitsa
2022-12-01 14:35 ` Ray Andrews
2022-12-01 14:42 ` Philippe Altherr
2022-12-01 21:19 ` Ray Andrews
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='CAN=4vMoG8UmeQwkQNJtXq_=q0mky1tdHHqDzW8DxNTyJDON+oQ@mail.gmail.com' \
--to=roman.perepelitsa@gmail.com \
--cc=rayandrews@eastlink.ca \
--cc=zsh-users@zsh.org \
/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).