Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: strange interaction between read command and pipe to less from function



On Sun, Mar 26, 2023 at 4:34 PM Jim <linux.tech.guy@xxxxxxxxx> 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.




Messages sorted by: Reverse Date, Date, Thread, Author