Comment

Comment by myztic

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

parent myztic 10 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton