Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Needs bash and gawk, bash you can avoid by changing

cmd = "bash -c 'read -n 1 input; echo $input'"

to

cmd = "saved=$(stty -g); stty raw; var=$(dd bs=1 count=1 2>/dev/null); stty \"$saved\"; echo \"$var\""

all credit to izabera from #bash on freenode



Finally merged that.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: