mirror of
https://github.com/nushell/nushell
synced 2025-01-15 14:44:14 +00:00
nu-cli/completions: fix file completions filtering (#5122)
This commit is contained in:
parent
4129f15eb9
commit
5e177fe8e7
2 changed files with 6 additions and 1 deletions
|
@ -97,6 +97,11 @@ impl Completer for FileCompletion {
|
||||||
|
|
||||||
non_hidden
|
non_hidden
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Replace base filter with no filter once all the results are already based in the current path
|
||||||
|
fn filter(&self, _: Vec<u8>, items: Vec<Suggestion>, _: CompletionOptions) -> Vec<Suggestion> {
|
||||||
|
items
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn file_path_completion(
|
pub fn file_path_completion(
|
||||||
|
|
|
@ -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':')
|
matches!(ch, b'{' | b'}' | b'[' | b']' | b',' | b':')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue