Save and restore cmd_mode across interpolation parsing so that luaX_readcommandcont resumes in the correct mode after a nested backtick command inside ${...}.
#16 multiline shell commands #17 _ scope (global vs local) #18 path expansion (~) #19 nested commands trigger prompt2 #20 simplify backtick return value #21 prompt redesign #22 implicit interactive commands (drop ! prefix) #23 general cleanup and refactor