Self-healing autopoietic shell: f(), tests, docs, interactive demo, fx fix-source layer
This commit is contained in:
Executable
+9
@@ -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]++'
|
||||
Reference in New Issue
Block a user