Self-healing autopoietic shell: f(), tests, docs, interactive demo, fx fix-source layer

This commit is contained in:
2026-08-17 22:30:18 -04:00
commit 8b30120fba
14 changed files with 767 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
#!/bin/sh
# Fuzzy-known source: surfaces fixes already taught for a command that
# *starts the same way* as this one, since f()'s own p lookup only ever
# matches the exact, literal string.
[ -f p ] || exit 0
cmd="$1"
first_word=$(printf '%s' "$cmd" | awk '{print $1}')
[ -n "$first_word" ] || exit 0
grep -F "${first_word} " p 2>/dev/null | cut -d= -f2- | awk '!seen[$0]++'