如果我开始在 SQLite shell 上输入多行命令,并在中途改变主意,如何再次回到 shell 提示符而不导致 SQLite 执行当前命令?
sqlite> INSERT INTO
...> mytable VALUES
...> ^C <---- changed my mind here, but ^C doesn't work
...>; <---- had to type ; to end the command
Error: near ";": syntax error <---- want to avoid this
如上所示,SQLite 尝试执行无效命令。有没有办法可以按下组合键并再次返回到干净的提示符?
答案1
尝试按CtrlU,这将从光标处擦除到行首。如果需要,要从光标处擦除到行尾:CtrlK