change the look of autocompletion
This commit is contained in:
parent
e1aad59ab5
commit
8dc0765f78
2 changed files with 5 additions and 1 deletions
|
@ -3,6 +3,7 @@ pub mod repl;
|
||||||
|
|
||||||
use std::{borrow::Borrow, collections::HashMap, sync::Arc};
|
use std::{borrow::Borrow, collections::HashMap, sync::Arc};
|
||||||
|
|
||||||
|
use colored::Colorize;
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
use log::{debug, info};
|
use log::{debug, info};
|
||||||
use parking_lot::RwLock;
|
use parking_lot::RwLock;
|
||||||
|
@ -128,6 +129,8 @@ impl CommandList {
|
||||||
}
|
}
|
||||||
(_, _) => command.execute(args),
|
(_, _) => command.execute(args),
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
eprintln!("Command: '{}' was not found", name.red().italic());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ impl Highlighter for MyHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn highlight_hint<'h>(&self, hint: &'h str) -> Cow<'h, str> {
|
fn highlight_hint<'h>(&self, hint: &'h str) -> Cow<'h, str> {
|
||||||
Owned(hint.bold().to_string())
|
Owned(hint.italic().bright_black().to_string())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,6 +139,7 @@ fn tokenize(command: &str) -> Vec<String> {
|
||||||
|
|
||||||
fn evaluate_command(input: &str) {
|
fn evaluate_command(input: &str) {
|
||||||
if input.trim().is_empty() {
|
if input.trim().is_empty() {
|
||||||
|
println!("Empty command, skipping. type 'help' for a list of commands.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue