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 committed 2026-03-05 00:13:34 +00:00
1 parent b3aa1d9c63
commit c96fae90c0
4 files changed
+12 -1

No files matched your search

+8
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