nushell/crates
Björn Richter cb18dd5200
Add decimals to int when using into string --decimals (#6085)
* Add decimals to int when using `into string --decimals`

* Add tests for `into string` when converting int with `--decimals`

* Apply formatting

* Merge `into_str` test files

* Comment out unused code and add TODOs

* Use decimal separator depending on system locale

* Add test helper to run closure in different locale

* Add tests for int-to-string conversion using different locales

* Add utils function to get system locale

* Add panic message when locking mutex fails

* Catch and resume panic later to prevent Mutex poisoning when test fails

* Move test to `nu-test-support` to keep `nu-utils` free of `nu-*` dependencies

See https://github.com/nushell/nushell/pull/6085#issuecomment-1193131694

* Rename test support fn `with_fake_locale` to `with_locale_override`

* Move `get_system_locale()` to `locale` module

* Allow overriding locale with special env variable (when not in release)

* Use special env var to override locale during testing

* Allow callback to return a value in `with_locale_override()`

* Allow multiple options in `nu!` macro

* Allow to set locale as `nu!` macro option

* Use new `locale` option of `nu!` macro instead of `with_locale_override`

Using the `locale` options does not lock the `LOCALE_OVERRIDE_MUTEX`
mutex in `nu-test-support::locale_override` but instead calls the `nu`
command directly with the `NU_LOCALE_OVERRIDE` environment variable.
This allows for parallel test excecution.

* Fix: Add option identifier for `cwd` in usage of `nu!` macro

* Rely on `Display` trait for formatting `nu!` macro command

- Removed the `DisplayPath` trait
- Implement `Display` for `AbsolutePath`, `RelativePath` and
  `AbsoluteFile`

* Default to locale `en_US.UTF-8` for tests when using `nu!` macro

* Add doc comment to `nu!` macro

* Format code using `cargo fmt --all`

* Pass function directly instead of wrapping the call in a closure

https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure

* Pass function to `or_else()` instead of calling it inside `or()`

https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call

* Fix: Add option identifier for `cwd` in usage of `nu!` macro
2022-08-12 21:13:50 -05:00
..
nu-cli Fix environment merging in hooks (#6309) 2022-08-13 01:13:28 +03:00
nu-color-config bump dev version ahead of language changes (#6267) 2022-08-09 08:15:41 +12:00
nu-command Add decimals to int when using into string --decimals (#6085) 2022-08-12 21:13:50 -05:00
nu-engine Clippy fix for Rust 1.63 (#6299) 2022-08-11 11:54:54 -05:00
nu-glob Clippy fix for Rust 1.63 (#6299) 2022-08-11 11:54:54 -05:00
nu-json bump dev version ahead of language changes (#6267) 2022-08-09 08:15:41 +12:00
nu-parser Allow overlays to import prefixed definitions (#6301) 2022-08-12 21:06:51 +03:00
nu-path bump dev version ahead of language changes (#6267) 2022-08-09 08:15:41 +12:00
nu-plugin Clippy fix for Rust 1.63 (#6299) 2022-08-11 11:54:54 -05:00
nu-pretty-hex bump dev version ahead of language changes (#6267) 2022-08-09 08:15:41 +12:00
nu-protocol Add decimals to int when using into string --decimals (#6085) 2022-08-12 21:13:50 -05:00
nu-system update a few nushell dependencies (#6291) 2022-08-10 14:56:15 -05:00
nu-table add rust toolchain file to pin rust version (#6298) 2022-08-11 15:45:01 -05:00
nu-term-grid Clippy fix for Rust 1.63 (#6299) 2022-08-11 11:54:54 -05:00
nu-test-support Add decimals to int when using into string --decimals (#6085) 2022-08-12 21:13:50 -05:00
nu-utils Add decimals to int when using into string --decimals (#6085) 2022-08-12 21:13:50 -05:00
nu_plugin_custom_values bump dev version ahead of language changes (#6267) 2022-08-09 08:15:41 +12:00
nu_plugin_example bump dev version ahead of language changes (#6267) 2022-08-09 08:15:41 +12:00
nu_plugin_gstat update a few nushell dependencies (#6291) 2022-08-10 14:56:15 -05:00
nu_plugin_inc bump dev version ahead of language changes (#6267) 2022-08-09 08:15:41 +12:00
nu_plugin_python fix python plugin example (#6242) 2022-08-05 23:57:31 -04:00
nu_plugin_query bump dev version ahead of language changes (#6267) 2022-08-09 08:15:41 +12:00
old bump dev version ahead of language changes (#6267) 2022-08-09 08:15:41 +12:00
README.md Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00

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.