mirror of
https://github.com/chatmail/core.git
synced 2026-04-18 22:16:30 +03:00
repl: do not treat empty string as command
Previously, just pressing "<Enter>" at prompt resulted in following error message: Error: Unknown command: "" type ? for help. This message is harmless, but useless. Also, such behaviour is different from many (if not all) interactive environments: python, bash, dash, ... With this change empty input string is silently ignored.
This commit is contained in:
@@ -1192,6 +1192,7 @@ pub unsafe fn dc_cmdline(context: &Context, line: &str) -> Result<(), failure::E
|
||||
bail!("Command failed.");
|
||||
}
|
||||
}
|
||||
"" => (),
|
||||
_ => bail!("Unknown command: \"{}\" type ? for help.", arg0),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user