From 47495715a6ddae62010caabb9e5c6e32df20728e Mon Sep 17 00:00:00 2001 From: Fernando Herrera Date: Tue, 11 Jan 2022 21:53:42 +0000 Subject: [PATCH] context menu with nucompleter (#722) --- Cargo.lock | 2 +- crates/nu-cli/Cargo.toml | 2 +- src/main.rs | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0728fb1def..f623d5fa35 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2777,7 +2777,7 @@ dependencies = [ [[package]] name = "reedline" version = "0.2.0" -source = "git+https://github.com/nushell/reedline?branch=main#af19a7bfc69ff44b08673fd17a587b0be4f879a6" +source = "git+https://github.com/nushell/reedline?branch=main#2cb2e40195b86145dd90779f4015dc834a62b720" dependencies = [ "chrono", "crossterm", diff --git a/crates/nu-cli/Cargo.toml b/crates/nu-cli/Cargo.toml index 641181f7c2..68977431f5 100644 --- a/crates/nu-cli/Cargo.toml +++ b/crates/nu-cli/Cargo.toml @@ -15,4 +15,4 @@ nu-color-config = { path = "../nu-color-config" } miette = { version = "3.0.0", features = ["fancy"] } thiserror = "1.0.29" reedline = { git = "https://github.com/nushell/reedline", branch = "main" } -log = "0.4" \ No newline at end of file +log = "0.4" diff --git a/src/main.rs b/src/main.rs index 2b6abc7b27..ab08a921b4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -403,7 +403,8 @@ fn main() -> Result<()> { engine_state: engine_state.clone(), })) .with_edit_mode(edit_mode) - .with_ansi_colors(config.use_ansi_coloring); + .with_ansi_colors(config.use_ansi_coloring) + .with_menu_completer(Box::new(NuCompleter::new(engine_state.clone()))); //FIXME: if config.use_ansi_coloring is false then we should // turn off the hinter but I don't see any way to do that yet.