zsh-users
 help / color / mirror / code / Atom feed
From: Roman Perepelitsa <roman.perepelitsa@gmail.com>
To: linuxtechguy@gmail.com
Cc: zsh <zsh-users@zsh.org>
Subject: Re: strange interaction between read command and pipe to less from function
Date: Sun, 26 Mar 2023 16:55:57 +0200	[thread overview]
Message-ID: <CAN=4vMpUG2xqpsOFg-o_9LaO_j5eMTFgErjaUfvTQSonqETetQ@mail.gmail.com> (raw)
In-Reply-To: <CA+rB6GKFf5m0_d+yEtkd7PBqHZdLfa6zEVENW7jDkJ-gV7z4FQ@mail.gmail.com>

On Sun, Mar 26, 2023 at 4:34 PM Jim <linux.tech.guy@gmail.com> wrote:
>
> [...] a function I am testing [...] has the following read statement which is part of a loop:
>
> for N ({0..255}) {
>   read -s -t1 -d $'\a' $'c?\e]4;'${N}$';?\a' && XC+=("$N ${c##*;}")
> }
>
> The issue is when the output of my function is piped to less.

Both the function and less read from the TTY. Which of them will
succeed when you press a key is anyone's guess.

Roman.


  reply	other threads:[~2023-03-26 14:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-26 14:33 Jim
2023-03-26 14:55 ` Roman Perepelitsa [this message]
2023-03-26 15:28   ` Jim
2023-03-26 15:49     ` Roman Perepelitsa
2023-03-26 17:04       ` Jim
2023-03-26 17:23         ` Roman Perepelitsa
2023-03-26 23:50           ` Lawrence Velázquez

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=4vMpUG2xqpsOFg-o_9LaO_j5eMTFgErjaUfvTQSonqETetQ@mail.gmail.com' \
    --to=roman.perepelitsa@gmail.com \
    --cc=linuxtechguy@gmail.com \
    --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).