Ignore blank/empty lines in SurrealDB SQL REPL

Closes #147
This commit is contained in:
Tobie Morgan Hitchcock 2022-09-15 00:39:01 +01:00
parent 6a3b1d99b5
commit 23d1132526

View file

@ -32,6 +32,10 @@ pub fn init(matches: &clap::ArgMatches) -> Result<(), Error> {
match readline { match readline {
// The user typed a query // The user typed a query
Ok(line) => { Ok(line) => {
// Ignore all empty lines
if line.is_empty() {
continue;
}
// Add the entry to the history // Add the entry to the history
rl.add_history_entry(line.as_str()); rl.add_history_entry(line.as_str());
// Make a new remote request // Make a new remote request