Merge 'Fix cli comments parsing' from Diego Reis

#711
I followed the patterns that sqlite has, so everything after `--` is
treated as a comment. A bunch of spaces and a `--` is treated as a
comment also.

Closes #718
This commit is contained in:
Pekka Enberg
2025-01-17 07:40:29 +02:00

View File

@@ -434,6 +434,9 @@ impl Limbo {
line: &str,
rl: &mut rustyline::DefaultEditor,
) -> anyhow::Result<()> {
if line.trim_start().starts_with("--") {
return Ok(());
}
if self.input_buff.is_empty() {
if line.is_empty() {
return Ok(());