mirror of
https://github.com/nushell/nushell.git
synced 2025-07-01 07:00:37 +02:00
Make config.filesize_format
/config.filesize_metric
conflict resolution consistent (#7410)
# Description Currently, `filesize_format`/`filesize_metric` conflicts are resolved as follows: if the `filesize_format` ends in "ib", then that overrides `filesize_metric`, otherwise, `filesize_metric` overrides `filesize_format`. This removes this difficult-to-predict asymmetric behaviour, and makes it so that `filesize_metric` always overrides `filesize_format`. This also adds tests for `$env.config.filesize.format` and `$env.config.filesize.metric` values. REMINDER: `filesize_metric` means "increments of 1000", and refers to KB-MB-GB-TB etc. # User-Facing Changes See above. # Tests + Formatting Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass # After Submitting If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date. Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/// Run a command in nu and get it's output
|
||||
/// Run a command in nu and get its output
|
||||
///
|
||||
/// The `nu!` macro accepts a number of options like the `cwd` in which the
|
||||
/// command should be run. It is also possible to specify a different `locale`
|
||||
|
Reference in New Issue
Block a user