mirror of
https://github.com/nushell/nushell.git
synced 2024-11-22 08:23:24 +01:00
6edf91dcae
# Description Nushell parser now reject comparison operator with 2 strings (e.g. `"abc" < "cba"`). This pr fixes it. ## before ```nu ~ ❯ "abc" < "bca" Error: nu::parser::unsupported_operation × less-than comparison is not supported on values of type string ╭─[entry #43:1:1] 1 │ "abc" < "bca" · ──┬── ┬ · │ ╰── doesn't support this value · ╰── string ╰──── ~ ❯ def foo []: nothing -> string { "abc" } ~ ❯ (foo) < "bca" Error: nu::parser::unsupported_operation × less-than comparison is not supported on values of type string ╭─[entry #53:1:1] 1 │ (foo) < "bca" · ──┬── ┬ · │ ╰── doesn't support this value · ╰── string ╰──── ``` ## after ```nu ~ ❯ "abc" < "bca" true ~ ❯ def foo []: nothing -> string { "abc" } ~ ❯ (foo) < "bca" true ``` # User-Facing Changes Following pattern will be allowed. | operator | type of lhs | type of rhs | result | | -------- | ----------- | ----------- | ------ | | `<` | string | string | bool | | `<=` | string | string | bool | | `>` | string | string | bool | | `>=` | string | string | bool | # Tests + Formatting - [x] `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - [x] `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used` to check that you're using the standard code style - [x] `cargo test --workspace` to check that all tests pass (on Windows make sure to [enable developer mode](https://learn.microsoft.com/en-us/windows/apps/get-started/developer-mode-features-and-debugging)) - [x] `cargo run -- -c "use std testing; testing run-tests --path crates/nu-std"` to run the tests for the standard library # After Submitting |
||
---|---|---|
.. | ||
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-lsp | ||
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.