Skip to content

Commit

Permalink
change the look of autocompletion
Browse files Browse the repository at this point in the history
  • Loading branch information
Caznix committed Dec 6, 2024
1 parent e1aad59 commit 8dc0765
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions engine/src/core/repl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ pub mod repl;

use std::{borrow::Borrow, collections::HashMap, sync::Arc};

use colored::Colorize;
use lazy_static::lazy_static;
use log::{debug, info};
use parking_lot::RwLock;
Expand Down Expand Up @@ -128,6 +129,8 @@ impl CommandList {
}
(_, _) => command.execute(args),
}
} else {
eprintln!("Command: '{}' was not found", name.red().italic());
}
}
}
3 changes: 2 additions & 1 deletion engine/src/core/repl/repl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl Highlighter for MyHelper {
}

fn highlight_hint<'h>(&self, hint: &'h str) -> Cow<'h, str> {
Owned(hint.bold().to_string())
Owned(hint.italic().bright_black().to_string())
}
}

Expand Down Expand Up @@ -139,6 +139,7 @@ fn tokenize(command: &str) -> Vec<String> {

fn evaluate_command(input: &str) {
if input.trim().is_empty() {
println!("Empty command, skipping. type 'help' for a list of commands.");
return;
}

Expand Down

0 comments on commit 8dc0765

Please sign in to comment.