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) <noreply@anthropic.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user