Files
drunkendotfiles/.local
dissimulo 4813512731 spam-ascii: fuzzy-match helper for /spam alias
New .local/bin/spam-ascii POSIX shell script: resolves a pattern to
a file in ~/ascii with this order:

  1. exact filename match
  2. exact name + common ASCII-art extension (.txt/.ans/.asc)
  3. first case-insensitive substring match (sorted alphabetically)

Non-zero exit + stderr-ish error if nothing matches, so /spam
prints 'no match in ~/ascii for: <pattern>' instead of spewing
a missing-file error.

Rewire the irssi /spam alias to call the script instead of
hardcoding 'cat ~/ascii/$0'. Now:

  /spam mario     -> matches ~/ascii/mario.txt or ~/ascii/Mario_art.ans
  /spam MARIO     -> case-insensitive
  /spam nothere   -> 'no match in ~/ascii for: nothere'
2026-04-21 09:48:40 -07:00
..