From c884d5ca31fee63bf784f607fb8fa40e9e47ea26 Mon Sep 17 00:00:00 2001 From: JT Date: Tue, 5 Oct 2021 10:50:46 +1300 Subject: [PATCH] Better completions for external args --- crates/nu-cli/src/completions.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/nu-cli/src/completions.rs b/crates/nu-cli/src/completions.rs index f0820f080..27ff57a6f 100644 --- a/crates/nu-cli/src/completions.rs +++ b/crates/nu-cli/src/completions.rs @@ -30,8 +30,6 @@ impl Completer for NuCompleter { let flattened = flatten_block(&working_set, &output); - // println!("flattened: {:?}", flattened); - for flat in flattened { if pos >= flat.0.start && pos <= flat.0.end { match &flat.1 { @@ -84,7 +82,9 @@ impl Completer for NuCompleter { }) .collect(); } - nu_parser::FlatShape::Filepath | nu_parser::FlatShape::GlobPattern => { + nu_parser::FlatShape::Filepath + | nu_parser::FlatShape::GlobPattern + | nu_parser::FlatShape::ExternalArg => { let prefix = working_set.get_span_contents(flat.0); let prefix = String::from_utf8_lossy(prefix).to_string();