diff --git a/crates/nu-cli/src/shell/completer.rs b/crates/nu-cli/src/shell/completer.rs index 1ed3939c7..a0c8d6750 100644 --- a/crates/nu-cli/src/shell/completer.rs +++ b/crates/nu-cli/src/shell/completer.rs @@ -76,15 +76,16 @@ impl NuCompleter { "cd" => select_directory_suggestions(completed_paths), _ => completed_paths, } + .into_iter() + .map(|suggestion| Suggestion { + replacement: requote(suggestion.replacement), + display: suggestion.display, + }) + .collect() } LocationType::Variable => Vec::new(), } - .into_iter() - }) - .map(|suggestion| Suggestion { - replacement: requote(suggestion.replacement), - display: suggestion.display, }) .collect();