mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 00:48:59 +02:00
Add filesize.show_unit
config option (#15276)
# Description Continuation of #15271. This PR adds the `$env.config.filesize.show_unit` option to allow the ability to omit the filesize unit. Useful if `$env.config.filesize.unit` is set to a fixed unit, and you don't want the same unit repeated over and over. # User-Facing Changes - Adds the `$env.config.filesize.show_unit` option.
This commit is contained in:
@ -381,9 +381,14 @@ $env.config.datetime_format.normal = "%m/%d/%y %I:%M:%S%p"
|
||||
# Otherwise, setting this to one of the filesize units will use that particular unit when displaying all file sizes.
|
||||
$env.config.filesize.unit = 'metric'
|
||||
|
||||
# filesize.show_unit (bool):
|
||||
# Whether to show or hide the file size unit. Useful if `$env.config.filesize.unit` is set to a fixed unit,
|
||||
# and you don't want that same unit repeated over and over again in which case you can set this to `false`.
|
||||
$env.config.filesize.show_unit = true
|
||||
|
||||
# filesize.precision (int or nothing):
|
||||
# The number of digits to display after the decimal point for file sizes.
|
||||
# When set to `null`, all digits after the decimal point will be displayed.
|
||||
# When set to `null`, all digits after the decimal point, if any, will be displayed.
|
||||
$env.config.filesize.precision = 1
|
||||
|
||||
# ---------------------
|
||||
|
@ -29,6 +29,8 @@ pub fn get_system_locale_string() -> Option<String> {
|
||||
},
|
||||
#[cfg(test)]
|
||||
{
|
||||
// For tests, we use the same locale on all systems.
|
||||
// To override this, set `LOCALE_OVERRIDE_ENV_VAR`.
|
||||
|| Some(Locale::en_US_POSIX.name().to_owned())
|
||||
},
|
||||
)
|
||||
|
Reference in New Issue
Block a user