update nu-ansi-term to 0.50, lscolors to 0.17, and add the Style attribute to Suggestion (#11635)

* update nu-ansi-term to 0.50.0
* update lscolors to 0.17.0
* add the Style attribute to Suggestion
* bump Reedline to the latest main
This commit is contained in:
Michael Angerman
2024-01-24 20:57:15 -08:00
committed by GitHub
parent 2a65d43c13
commit f286286510
20 changed files with 68 additions and 44 deletions

View File

@ -94,6 +94,7 @@ impl CommandCompletion {
.map(move |x| Suggestion {
value: String::from_utf8_lossy(&x.0).to_string(),
description: x.1,
style: None,
extra: None,
span: reedline::Span::new(span.start - offset, span.end - offset),
append_whitespace: true,
@ -110,6 +111,7 @@ impl CommandCompletion {
.map(move |x| Suggestion {
value: x,
description: None,
style: None,
extra: None,
span: reedline::Span::new(span.start - offset, span.end - offset),
append_whitespace: true,
@ -123,6 +125,7 @@ impl CommandCompletion {
results.push(Suggestion {
value: format!("^{}", external.value),
description: None,
style: None,
extra: None,
span: external.span,
append_whitespace: true,

View File

@ -465,6 +465,7 @@ pub fn map_value_completions<'a>(
return Some(Suggestion {
value: s,
description: None,
style: None,
extra: None,
span: reedline::Span {
start: span.start - offset,
@ -479,6 +480,7 @@ pub fn map_value_completions<'a>(
let mut suggestion = Suggestion {
value: String::from(""), // Initialize with empty string
description: None,
style: None,
extra: None,
span: reedline::Span {
start: span.start - offset,

View File

@ -44,6 +44,7 @@ impl Completer for DirectoryCompletion {
.map(move |x| Suggestion {
value: x.1,
description: None,
style: None,
extra: None,
span: reedline::Span {
start: x.0.start - offset,

View File

@ -111,6 +111,7 @@ impl Completer for DotNuCompletion {
.map(move |x| Suggestion {
value: x.1,
description: None,
style: None,
extra: None,
span: reedline::Span {
start: x.0.start - offset,

View File

@ -49,6 +49,7 @@ impl Completer for FileCompletion {
.map(move |x| Suggestion {
value: x.1,
description: None,
style: None,
extra: None,
span: reedline::Span {
start: x.0.start - offset,

View File

@ -46,6 +46,7 @@ impl Completer for FlagCompletion {
output.push(Suggestion {
value: String::from_utf8_lossy(&named).to_string(),
description: Some(flag_desc.to_string()),
style: None,
extra: None,
span: reedline::Span {
start: span.start - offset,
@ -68,6 +69,7 @@ impl Completer for FlagCompletion {
output.push(Suggestion {
value: String::from_utf8_lossy(&named).to_string(),
description: Some(flag_desc.to_string()),
style: None,
extra: None,
span: reedline::Span {
start: span.start - offset,

View File

@ -95,6 +95,7 @@ impl Completer for VariableCompletion {
output.push(Suggestion {
value: env_var.0,
description: None,
style: None,
extra: None,
span: current_span,
append_whitespace: false,
@ -165,6 +166,7 @@ impl Completer for VariableCompletion {
output.push(Suggestion {
value: builtin.to_string(),
description: None,
style: None,
extra: None,
span: current_span,
append_whitespace: false,
@ -187,6 +189,7 @@ impl Completer for VariableCompletion {
output.push(Suggestion {
value: String::from_utf8_lossy(v.0).to_string(),
description: None,
style: None,
extra: None,
span: current_span,
append_whitespace: false,
@ -208,6 +211,7 @@ impl Completer for VariableCompletion {
output.push(Suggestion {
value: String::from_utf8_lossy(v.0).to_string(),
description: None,
style: None,
extra: None,
span: current_span,
append_whitespace: false,
@ -239,6 +243,7 @@ fn nested_suggestions(
output.push(Suggestion {
value: col,
description: None,
style: None,
extra: None,
span: current_span,
append_whitespace: false,
@ -253,6 +258,7 @@ fn nested_suggestions(
output.push(Suggestion {
value: column_name.to_string(),
description: None,
style: None,
extra: None,
span: current_span,
append_whitespace: false,
@ -266,6 +272,7 @@ fn nested_suggestions(
output.push(Suggestion {
value: column_name,
description: None,
style: None,
extra: None,
span: current_span,
append_whitespace: false,

View File

@ -102,6 +102,7 @@ impl NuHelpCompleter {
Suggestion {
value: sig.name.clone(),
description: Some(long_desc),
style: None,
extra: Some(extra),
span: reedline::Span {
start: pos - line.len(),

View File

@ -146,6 +146,7 @@ fn convert_to_suggestions(
vec![Suggestion {
value: text,
description,
style: None,
extra,
span,
append_whitespace: false,
@ -158,6 +159,7 @@ fn convert_to_suggestions(
_ => vec![Suggestion {
value: format!("Not a record: {value:?}"),
description: None,
style: None,
extra: None,
span: reedline::Span {
start: if only_buffer_difference {