mirror of
https://github.com/nushell/nushell.git
synced 2025-08-18 06:40:16 +02:00
Cleanup and bump rustyline
This commit is contained in:
@@ -19,7 +19,6 @@ impl Completer for NuCompleter {
|
||||
pos: usize,
|
||||
context: &rustyline::Context,
|
||||
) -> rustyline::Result<(usize, Vec<completion::Pair>)> {
|
||||
|
||||
let commands: Vec<String> = self.commands.keys().cloned().collect();
|
||||
|
||||
let mut completions = self.file_completer.complete(line, pos, context)?.1;
|
||||
@@ -51,8 +50,8 @@ impl Completer for NuCompleter {
|
||||
|
||||
if matched {
|
||||
completions.push(completion::Pair {
|
||||
display: command.to_string(),
|
||||
replacement: command.to_string(),
|
||||
display: command.clone(),
|
||||
replacement: command.clone(),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@@ -47,7 +47,7 @@ impl Hinter for Helper {
|
||||
}
|
||||
|
||||
impl Highlighter for Helper {
|
||||
fn highlight_prompt<'p>(&self, prompt: &'p str) -> Cow<'p, str> {
|
||||
fn highlight_prompt<'b, 's: 'b, 'p:'b>(&'s self, prompt: &'p str, _: bool) -> Cow<'b, str> {
|
||||
Owned("\x1b[32m".to_owned() + &prompt[0..prompt.len() - 2] + "\x1b[m> ")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user