~kris/dots

srice

ref: a4bfa48cdda924f7a77a81e8d8e93e326a01b8a0 srice/.local/bin/crossword -rwxr-xr-x 221 bytes
a4bfa48c — Kris Yotam mksh: reliable history hook via HISTFILE growth + binary record parse 3 months ago
                                                                                
1
2
3
4
5
6
#!/usr/bin/env bash
# crossword -- pattern match, _ = unknown letter
# Usage: crossword "c_t" -> cat, cot, cut, ...
pattern="${1:?Usage: crossword 'c_t'}"
regex="^${pattern//_/.}$"
grep -ix "$regex" /usr/share/dict/words