mirror of
https://github.com/nushell/nushell.git
synced 2025-01-11 08:48:23 +01:00
332f1192a6
the first part of this PR comes from a request from @presidento in #8525. the second one is an improvement of the error support. # Description this PR - computes `module_search_pattern` to only `ls` the selected modules => the goal is to save search time in the future with more tests - gives better errors when - the `--path` is invalid - the `--module` does not exist - the search is too strict ### examples ```bash >_ nu crates/nu-utils/standard_library/tests.nu --path does-not-exist Error: × directory_not_found ╭─[<commandline>:1:1] 1 │ main --path does-not-exist · ───────┬────── · ╰── no such directory ╰──── ``` ```bash >_ nu crates/nu-utils/standard_library/tests.nu --module does-not-exist Error: × module_not_found ╭─[<commandline>:1:1] 1 │ main --module does-not-exist · ───────┬────── · ╰── no such module in /home/amtoine/.local/share/git/store/github.com/amtoine/nushell/crates/nu-utils/standard_library/ ╰──── ``` ```bash >_ nu crates/nu-utils/standard_library/tests.nu --command does_not_exist Error: × no test to run ``` instead of the previous ```bash >_ nu crates/nu-utils/standard_library/tests.nu --path does-not-exist Error: × No matches found for /home/amtoine/.local/share/git/store/github.com/amtoine/nushell/does-not-exist/test_*.nu ╭─[/home/amtoine/.local/share/git/store/github.com/amtoine/nushell/crates/nu-utils/standard_library/tests.nu:32:1] 32 │ let tests = ( 33 │ ls ($path | default $env.FILE_PWD | path join "test_*.nu") · ───────────────────────────┬─────────────────────────── · ╰── Pattern, file or folder not found 34 │ | each {|row| {file: $row.name name: ($row.name | path parse | get stem)}} ╰──── help: no matches found ``` ```bash >_ nu crates/nu-utils/standard_library/tests.nu --module does-not-exist Error: × expected table from pipeline ╭─[/home/amtoine/.local/share/git/store/github.com/amtoine/nushell/crates/nu-utils/standard_library/tests.nu:59:1] 59 │ $tests_to_run 60 │ | group-by module · ────┬─── · ╰── requires a table input 61 │ | transpose name tests ╰──── ``` ```bash >_ nu crates/nu-utils/standard_library/tests.nu --command does-not-exist Error: × expected table from pipeline ╭─[/home/amtoine/.local/share/git/store/github.com/amtoine/nushell/crates/nu-utils/standard_library/tests.nu:59:1] 59 │ $tests_to_run 60 │ | group-by module · ────┬─── · ╰── requires a table input 61 │ | transpose name tests ╰──── ``` # User-Facing Changes ``` $nothing ``` # Tests + Formatting ``` $nothing ``` # After Submitting ``` $nothing ``` |
||
---|---|---|
.. | ||
nu_plugin_custom_values | ||
nu_plugin_example | ||
nu_plugin_formats | ||
nu_plugin_gstat | ||
nu_plugin_inc | ||
nu_plugin_python | ||
nu_plugin_query | ||
nu-cli | ||
nu-cmd-lang | ||
nu-color-config | ||
nu-command | ||
nu-engine | ||
nu-explore | ||
nu-glob | ||
nu-json | ||
nu-parser | ||
nu-path | ||
nu-plugin | ||
nu-pretty-hex | ||
nu-protocol | ||
nu-system | ||
nu-table | ||
nu-term-grid | ||
nu-test-support | ||
nu-utils | ||
README.md |
Nushell core libraries and plugins
These sub-crates form both the foundation for Nu and a set of plugins which extend Nu with additional functionality.
Foundational libraries are split into two kinds of crates:
- Core crates - those crates that work together to build the Nushell language engine
- Support crates - a set of crates that support the engine with additional features like JSON support, ANSI support, and more.
Plugins are likewise also split into two types:
- Core plugins - plugins that provide part of the default experience of Nu, including access to the system properties, processes, and web-connectivity features.
- Extra plugins - these plugins run a wide range of different capabilities like working with different file types, charting, viewing binary data, and more.