forked from extern/nushell
16453b6986
# Description Closes #10441 Uses `String::to_lowercase()` when the file's extension `ext` is parsed to allow `from_decl(format!("from {ext}"))` to return the desired output regardless of extension case. It doesn't work with sqlite files since those are handled earlier in the parsing but I think is good- since there's no standard file extension used by sqlite so a user will likely want case sensitivity in that case. This also has the (possibly undesired) effect of making `open` completely case insensitive, e.g. `open foo.JSON` will work on a file named `foo.json` and vice versa. This is good on Windows as it treats `foo.json` and `foo.JSON` as the same file, but may not be the desired behaviour on Unix. If this behaviour is undesired I assume it would be fixed with a `#[cfg(not(unix))]` attribute on the `to_lowercase()` operation but that produces slightly "uglier" code that I didn't wish to submit unless necessary. old behaviour: ![image](https://github.com/nushell/nushell/assets/79598494/261df577-e377-44ac-bef3-f6384bceaeb5) new behaviour: ![image](https://github.com/nushell/nushell/assets/79598494/04271740-a46f-4613-a3a6-1e220ef7f829) # User-Facing Changes `open` will now present a table when `open`-ing files with captitalized extensions rather than the file's raw data # Tests + Formatting new test: `parses_file_with_uppercase_extension` which tests the desired behaviour --------- Co-authored-by: Stefan Holderbach <sholderbach@users.noreply.github.com> |
||
---|---|---|
.. | ||
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-base | ||
nu-cmd-dataframe | ||
nu-cmd-extra | ||
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-std | ||
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.