Maja changed the topic of ##bash-crimes to: we bash back | club of folks preoccupied in whether they could, not whether they should | logs https://libera.irclog.whitequark.org/~h~bash-crimes
_catircservices1 has quit [Quit: Bridge terminating on SIGTERM]
_catircservices has joined ##bash-crimes
<sdomi> i wish you could call shift on arbitrary arrays
<sdomi> hmm. i'm trying to read various ANSI escape codes (from key combos) and some of them just don't come through
<sdomi> i'd like to read ^R, when using plain `read` I can see it coming through on the terminal but $REPLY is empty :<
<sdomi> internet search no longer exists so i'm a bit stumped
<sdomi> to answer my own question: `read -n1` gives me a proper \x12 as output, while `read` just ignores the character
<sdomi> i'm stumped
<sdomi> thank you for nothing gnu
<JAA> > printf '\x12' | { read; declare -p REPLY; }
<JAA> declare -- REPLY=$'\022'
<JAA> ¯\_(ツ)_/¯
<sdomi> JAA: execute the same but instead of printf, just do ctrl+R and return
<sdomi> this is definitely a bug in some code which handles ttys
<JAA> Ah
<JAA> > stty -echo; read; declare -p REPLY; stty echo
<JAA> declare -- REPLY=$'\022'