diff --git a/Cargo.lock b/Cargo.lock index 362d64ba99..f0d06e95c5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4819,7 +4819,7 @@ dependencies = [ [[package]] name = "reedline" version = "0.32.0" -source = "git+https://github.com/nushell/reedline?branch=main#a580ea56d4e5a889468b2969d2a1534379504ab6" +source = "git+https://github.com/ysthakur/reedline?branch=fuzzy-select-underline#a747c7110eb5113c347c99cd6f1ee09d2c4a0084" dependencies = [ "arboard", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 665fd21747..235aaf7b54 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -298,7 +298,7 @@ bench = false # To use a development version of a dependency please use a global override here # changing versions in each sub-crate of the workspace is tedious [patch.crates-io] -reedline = { git = "https://github.com/nushell/reedline", branch = "main" } +reedline = { git = "https://github.com/ysthakur/reedline", branch = "fuzzy-select-underline" } # nu-ansi-term = {git = "https://github.com/nushell/nu-ansi-term.git", branch = "main"} # Run all benchmarks with `cargo bench` diff --git a/crates/nu-cli/src/completions/command_completions.rs b/crates/nu-cli/src/completions/command_completions.rs index 2549854540..4a95202d30 100644 --- a/crates/nu-cli/src/completions/command_completions.rs +++ b/crates/nu-cli/src/completions/command_completions.rs @@ -103,6 +103,7 @@ impl CommandCompletion { extra: None, span: reedline::Span::new(span.start - offset, span.end - offset), append_whitespace: true, + match_indices: None, }, kind: Some(SuggestionKind::Command(x.2)), }) @@ -123,6 +124,7 @@ impl CommandCompletion { extra: None, span: reedline::Span::new(span.start - offset, span.end - offset), append_whitespace: true, + match_indices: None, }, // TODO: is there a way to create a test? kind: None, @@ -141,6 +143,7 @@ impl CommandCompletion { extra: None, span: external.suggestion.span, append_whitespace: true, + match_indices: None, }, kind: external.kind, }) diff --git a/crates/nu-cli/src/completions/completer.rs b/crates/nu-cli/src/completions/completer.rs index 007a0e288a..5a7806a8d2 100644 --- a/crates/nu-cli/src/completions/completer.rs +++ b/crates/nu-cli/src/completions/completer.rs @@ -457,6 +457,7 @@ pub fn map_value_completions<'a>( end: span.end - offset, }, append_whitespace: false, + match_indices: None, }, kind: Some(SuggestionKind::Type(x.get_type())), }); @@ -474,6 +475,7 @@ pub fn map_value_completions<'a>( end: span.end - offset, }, append_whitespace: false, + match_indices: None, }; // Iterate the cols looking for `value` and `description` diff --git a/crates/nu-cli/src/completions/directory_completions.rs b/crates/nu-cli/src/completions/directory_completions.rs index 024322f997..5bef87fe45 100644 --- a/crates/nu-cli/src/completions/directory_completions.rs +++ b/crates/nu-cli/src/completions/directory_completions.rs @@ -56,6 +56,7 @@ impl Completer for DirectoryCompletion { end: x.0.end - offset, }, append_whitespace: false, + match_indices: None, }, // TODO???? kind: None, diff --git a/crates/nu-cli/src/completions/dotnu_completions.rs b/crates/nu-cli/src/completions/dotnu_completions.rs index c939578b41..4221c82588 100644 --- a/crates/nu-cli/src/completions/dotnu_completions.rs +++ b/crates/nu-cli/src/completions/dotnu_completions.rs @@ -124,6 +124,7 @@ impl Completer for DotNuCompletion { end: x.0.end - offset, }, append_whitespace: true, + match_indices: None, }, // TODO???? kind: None, diff --git a/crates/nu-cli/src/completions/file_completions.rs b/crates/nu-cli/src/completions/file_completions.rs index f6205f6792..96cc50858c 100644 --- a/crates/nu-cli/src/completions/file_completions.rs +++ b/crates/nu-cli/src/completions/file_completions.rs @@ -61,6 +61,7 @@ impl Completer for FileCompletion { end: x.0.end - offset, }, append_whitespace: false, + match_indices: None, }, // TODO???? kind: None, diff --git a/crates/nu-cli/src/completions/flag_completions.rs b/crates/nu-cli/src/completions/flag_completions.rs index b0dcc0963b..9f10787175 100644 --- a/crates/nu-cli/src/completions/flag_completions.rs +++ b/crates/nu-cli/src/completions/flag_completions.rs @@ -56,6 +56,7 @@ impl Completer for FlagCompletion { end: span.end - offset, }, append_whitespace: true, + match_indices: None, }, // TODO???? kind: None, @@ -83,6 +84,7 @@ impl Completer for FlagCompletion { end: span.end - offset, }, append_whitespace: true, + match_indices: None, }, // TODO???? kind: None, diff --git a/crates/nu-cli/src/completions/variable_completions.rs b/crates/nu-cli/src/completions/variable_completions.rs index 0572fe93c1..ba91218c05 100644 --- a/crates/nu-cli/src/completions/variable_completions.rs +++ b/crates/nu-cli/src/completions/variable_completions.rs @@ -87,6 +87,7 @@ impl Completer for VariableCompletion { extra: None, span: current_span, append_whitespace: false, + match_indices: None, }, kind: Some(SuggestionKind::Type(env_var.1.get_type())), }); @@ -159,6 +160,7 @@ impl Completer for VariableCompletion { extra: None, span: current_span, append_whitespace: false, + match_indices: None, }, // TODO is there a way to get the VarId to get the type??? kind: None, @@ -186,6 +188,7 @@ impl Completer for VariableCompletion { extra: None, span: current_span, append_whitespace: false, + match_indices: None, }, kind: Some(SuggestionKind::Type( working_set.get_variable(*v.1).ty.clone(), @@ -217,6 +220,7 @@ impl Completer for VariableCompletion { extra: None, span: current_span, append_whitespace: false, + match_indices: None, }, kind: Some(SuggestionKind::Type( working_set.get_variable(*v.1).ty.clone(), @@ -255,6 +259,7 @@ fn nested_suggestions( extra: None, span: current_span, append_whitespace: false, + match_indices: None, }, kind: Some(kind.clone()), }); @@ -272,6 +277,7 @@ fn nested_suggestions( extra: None, span: current_span, append_whitespace: false, + match_indices: None, }, kind: Some(kind.clone()), }); diff --git a/crates/nu-cli/src/menus/help_completions.rs b/crates/nu-cli/src/menus/help_completions.rs index c9c1b7bf94..3fb93fdb73 100644 --- a/crates/nu-cli/src/menus/help_completions.rs +++ b/crates/nu-cli/src/menus/help_completions.rs @@ -108,6 +108,7 @@ impl NuHelpCompleter { end: pos, }, append_whitespace: false, + match_indices: None, } }) .collect() diff --git a/crates/nu-cli/src/menus/menu_completions.rs b/crates/nu-cli/src/menus/menu_completions.rs index c65f0bd100..18cce22cb7 100644 --- a/crates/nu-cli/src/menus/menu_completions.rs +++ b/crates/nu-cli/src/menus/menu_completions.rs @@ -146,6 +146,7 @@ fn convert_to_suggestions( extra, span, append_whitespace: false, + match_indices: None, }] } Value::List { vals, .. } => vals @@ -170,6 +171,7 @@ fn convert_to_suggestions( }, }, append_whitespace: false, + match_indices: None, }], } }