Skip to content

Commit a3b3dea

Browse files
committedDec 29, 2024
Add support for displaying file sizes in bytes with a separator
1 parent 1636cab commit a3b3dea

File tree

6 files changed

+255
-11
lines changed

6 files changed

+255
-11
lines changed
 

‎Cargo.lock

+184-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml

+2
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,12 @@ xdg = "2.5"
5252
git2 = { version = "0.18", optional = true, default-features = false }
5353

5454
[target.'cfg(unix)'.dependencies]
55+
num-format = { version = "0.4.4", features = ["with-system-locale"] }
5556
users = { version = "0.11.3", package = "uzers" }
5657
xattr = "1"
5758

5859
[target.'cfg(windows)'.dependencies]
60+
num-format = "0.4.4"
5961
windows = { version = "0.43.0", features = ["Win32_Foundation", "Win32_Security_Authorization", "Win32_Storage_FileSystem", "Win32_System_Memory"] }
6062

6163
[dependencies.clap]

‎doc/lsd.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ lsd is a ls command with a lot of pretty colours and some other stuff to enrich
126126
: How to display permissions [default: rwx for linux, attributes for windows] [possible values: rwx, octal, attributes, disable]
127127

128128
`--size <size>...`
129-
: How to display size [default: default] [possible values: default, short, bytes]
129+
: How to display size [default: default] [possible values: default, short, bytes, bytes-with-separator]
130130

131131
`--sort <WORD>...`
132132
: Sort by WORD instead of name [possible values: size, time, version, extension, git]

‎src/app.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ pub struct Cli {
7373
pub permission: Option<String>,
7474

7575
/// How to display size [default: default]
76-
#[arg(long, value_name = "MODE", value_parser = ["default", "short", "bytes"])]
76+
#[arg(long, value_name = "MODE", value_parser = ["default", "short", "bytes", "bytes-with-separator"])]
7777
pub size: Option<String>,
7878

7979
/// Display the total size of directories

0 commit comments

Comments
 (0)