diff --git a/crates/nu-cli/src/completions.rs b/crates/nu-cli/src/completions.rs index 0bf5e3ac9c..43215fac80 100644 --- a/crates/nu-cli/src/completions.rs +++ b/crates/nu-cli/src/completions.rs @@ -257,6 +257,7 @@ impl NuCompleter { let mut output = vec![]; for named in &sig.named { + let flag_desc = &named.desc; if let Some(short) = named.short { let mut named = vec![0; short.len_utf8()]; short.encode_utf8(&mut named); @@ -264,7 +265,7 @@ impl NuCompleter { if named.starts_with(&prefix) { output.push(Suggestion { value: String::from_utf8_lossy(&named).to_string(), - description: None, + description: Some(flag_desc.to_string()), span: reedline::Span { start: new_span.start - offset, end: new_span.end - offset, @@ -283,7 +284,7 @@ impl NuCompleter { if named.starts_with(&prefix) { output.push(Suggestion { value: String::from_utf8_lossy(&named).to_string(), - description: None, + description: Some(flag_desc.to_string()), span: reedline::Span { start: new_span.start - offset, end: new_span.end - offset,