cli: Improve CLI prompt

Let's print out Limbo version at CLI start and change the prompt to have
"limbo" prefix.
This commit is contained in:
Pekka Enberg
2024-07-25 15:24:20 +03:00
parent 24433177f1
commit 341240740a

View File

@@ -53,9 +53,10 @@ fn main() -> anyhow::Result<()> {
if history_file.exists() {
rl.load_history(history_file.as_path())?;
}
println!("Welcome to Limbo SQL shell!");
println!("Limbo v{}", env!("CARGO_PKG_VERSION"));
println!("Enter \".help\" for usage hints.");
loop {
let readline = rl.readline("\x1b[90m>\x1b[0m ");
let readline = rl.readline("limbo> ");
match readline {
Ok(line) => {
rl.add_history_entry(line.to_owned())?;