Fix nested commands in interactive mode triggering prompt2 (issue #19)

Save and restore cmd_mode across interpolation parsing so that
luaX_readcommandcont resumes in the correct mode after a nested
backtick command inside ${...}.
This commit is contained in:
Cormac Shannon
2026-03-05 00:13:34 +00:00
parent b3aa1d9c63
commit c96fae90c0
4 changed files with 12 additions and 1 deletions

View File

@@ -86,6 +86,14 @@ do
assert(run_cmd() == 0)
end
-- ===== NESTED BACKTICK IN INTERPOLATION (issue #19) =====
do
local result = `echo hello`
!echo ${result.stdout}
assert(_.code == 0)
end
-- ===== EMPTY COMMAND (just whitespace after !) =====
do