feature: Support for dereference links -L follow

du has -L flag which allows it to dereference or follow
symlinks. Clone this feature into dust.
https://github.com/bootandy/dust/issues/276
This commit is contained in:
andy.boot
2023-01-07 14:04:14 +00:00
parent a3ab5bfe0f
commit abcc46c5ea
8 changed files with 19 additions and 3 deletions

View File

@@ -33,6 +33,12 @@ pub fn build_cli() -> Command<'static> {
.number_of_values(1)
.multiple_occurrences(true)
.help("Exclude any file or directory with this name"),
)
.arg(
Arg::new("dereference_links")
.short('L')
.long("dereference-links")
.help("dereference sym links - Treat sym links as directories and go into them"),
)
.arg(
Arg::new("limit_filesystem")
@@ -136,6 +142,6 @@ pub fn build_cli() -> Command<'static> {
Arg::new("only_dir")
.short('D')
.long("only-dir")
.help("Only directories will be displayed."),
.help("Only directories will be displayed."),
)
}