wow, very nice work!
I have a few minor bugs to report. (despite the code being (impressively) concise enough that after briefly skimming it i was pretty confident that it wasn't malicious, i ran it in a fresh minimal container anyway... which explains how i encountered the first three of these.)
- if
/usr/share/dict/wordsis not present, it does not report any problem and simply says "invalid word" for every guess entered. (it should give an error and refuse to start in this case.) - if
bcis not installed, the stats screen says./wordy.sh: line 275: bc: command not foundwhich could be handled more gracefully. (same for ifcolumnis not installed on the help screen.) - typing "c" to edit the config fails silently if the preferred editor is not available. this also could print an error explaining what is missing instead.
- using my laptop's trackpad, every mouse click is registering twice. however, using its touchscreen it actually works. (i investigated this a little and it seems that my terminal emulator is sending the same mousedown and mouseup events for both the touchscreen and trackpad; i guess the difference is that there is a brief pause between them when I use the trackpad?)
- there are several typos in the comments in the config file
one more thought: "hard mode" doesn't really make sense to me; preventing accidental definitely-incorrect guesses ultimately makes it easier, doesn't it?
thanks again for sharing this!
edit: in case anyone else wants to run this in a debian:trixie container, an apt install line you can use to get /usr/share/dict/words, bc, and column is:
apt install --no-install-recommends wamerican bc bsdextrautils
(and to create the container, after cd'ing into the git checkout, i'm running podman run -v $(pwd):$(pwd) -w $(pwd) --rm -it debian:trixie bash)

