Hi everyone,
I'm at a loss trying to figure out what is going on with a function I am testing.
It 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##*;}")
}
This works just fine in retrieving the hex color codes in both xterm and xfce4-terminal.
The issue is when the output of my function is piped to less. The keys do not respond
correctly. Where 'space' would normally page the output, or 'q' would quit less, I now
have to follow the keystroke(space, q, gg ...) with the 'enter' key to have the action take
place.
Commenting out the read statement and less acts normally from output I generated
to test with or without the read statement.
I attached the function file with an added '.txt' extension to name(FYI).
Any thoughts on what is happening would be appreciated. The read statement was
taken from something I found on one of the 'Stack' sites if I remember correctly.
I guess I could be using the read statement incorrectly, but I don't know what it
could be.
ZSH_PATCHLEVEL: zsh-5.9-0-g73d3173
Thanks in advance, and regards,
Jim Murphy