context menu with nucompleter (#722)

This commit is contained in:
Fernando Herrera 2022-01-11 21:53:42 +00:00 committed by GitHub
parent ffb086d56f
commit 47495715a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

2
Cargo.lock generated
View File

@ -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",

View File

@ -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"
log = "0.4"

View File

@ -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.