From ce1378edee892298466bf43b49759b557df801f5 Mon Sep 17 00:00:00 2001 From: Markus Fritsche Date: Sat, 16 May 2026 21:14:57 +0000 Subject: [PATCH] repl: fix {name} pattern to accept underscores (#10 follow-up) %w excludes underscore in Lua patterns, so {ctx_used}, {ctx_max}, {cwd_short}, {last_status} were left literal in the prompt. Use [%w_] to accept identifiers with underscores. Surfaced during higgs smoke test of the new template. Co-Authored-By: Claude Opus 4.7 (1M context) --- repl.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repl.lua b/repl.lua index 094c3af..e1bbd65 100644 --- a/repl.lua +++ b/repl.lua @@ -481,7 +481,7 @@ function M.run(config) last_status = last_exec_code and tostring(last_exec_code) or "", mode = _mode(), } - return (tmpl:gsub("{(%w+)}", function(k) return vars[k] or "" end)) + return (tmpl:gsub("{([%w_]+)}", function(k) return vars[k] or "" end)) end if ctx.norris_active then return ("[aish:%s \xE2\x9A\xA1]> "):format(active_name)