nu-cli: added tests for file completions (#5232)

* nu-cli: added tests for file completions

* test adding extra sort

* Feature/refactor completion options (#5228)

* Copy completion filter to custom completions

* Remove filter function from completer

This function was a no-op for FileCompletion and CommandCompletion.
Flag- and VariableCompletion just filters with `starts_with` which
happens in both completers anyway and should therefore also be a no-op.
The remaining use case in CustomCompletion was moved into the
CustomCompletion source file.

Filtering should probably happen immediately while fetching completions
to avoid unnecessary memory allocations.

* Add get_sort_by() to Completer trait

* Remove CompletionOptions from Completer::fetch()

* Fix clippy lints

* Apply Completer changes to DotNuCompletion

* add os to $nu based on rust's understanding (#5243)

* add os to $nu based on rust's understanding

* add a few more constants

Co-authored-by: Richard <Tropid@users.noreply.github.com>
Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
This commit is contained in:
Herlon Aguiar
2022-04-20 06:54:00 +02:00
committed by GitHub
parent f2d47f97da
commit 4d7b86f278
12 changed files with 93 additions and 2 deletions

View File

@ -258,7 +258,7 @@ pub fn binaries() -> PathBuf {
}
pub fn fixtures() -> PathBuf {
root().join("tests/fixtures")
root().join("tests").join("fixtures")
}
pub fn assets() -> PathBuf {