diff --git a/crates/nu-cli/src/completions/file_completions.rs b/crates/nu-cli/src/completions/file_completions.rs index 2c9ff2fbf..0f20dd66e 100644 --- a/crates/nu-cli/src/completions/file_completions.rs +++ b/crates/nu-cli/src/completions/file_completions.rs @@ -97,6 +97,11 @@ impl Completer for FileCompletion { non_hidden } + + // Replace base filter with no filter once all the results are already based in the current path + fn filter(&self, _: Vec, items: Vec, _: CompletionOptions) -> Vec { + items + } } pub fn file_path_completion( diff --git a/crates/nu-json/src/de.rs b/crates/nu-json/src/de.rs index 430aa68b0..a462a408f 100644 --- a/crates/nu-json/src/de.rs +++ b/crates/nu-json/src/de.rs @@ -70,7 +70,7 @@ where } } - fn is_punctuator_char(&mut self, ch: u8) -> bool { + fn is_punctuator_char(&self, ch: u8) -> bool { matches!(ch, b'{' | b'}' | b'[' | b']' | b',' | b':') }