[GH-ISSUE #314] Default depth value from config #137

Closed
opened 2026-06-08 11:25:50 +03:00 by zhus · 1 comment
Owner

Originally created by @yitsushi on GitHub (Feb 28, 2023).
Original GitHub issue: https://github.com/bootandy/dust/issues/314

The only thing blocks me to alias dust to du is the depth value. I don't want to specify depth every single time, and if I forget to add it can be painful if the directory structure is very deep. Most of the time I need --depth=1, but not all the time.

I can't set alias to du="dust --depth=1" because if I want to use a different value, it will cry about it: "The argument '--depth ' was provided more than once".

The easiest solution would be to add a default value in the config (depth) and it would work the same way as other options:

  1. If --depth is defined, use that value.
  2. If depth is defined in config, use that value.
  3. Otherwise use usize::MAX (that's the default now).

Is there a way to achieve it and I just couldn't figure it out or it's a missing feature. If it's a missing feature, I have a branch with it locally so I can file a PR anytime.

Originally created by @yitsushi on GitHub (Feb 28, 2023). Original GitHub issue: https://github.com/bootandy/dust/issues/314 The only thing blocks me to alias `dust` to `du` is the `depth` value. I don't want to specify `depth` every single time, and if I forget to add it can be painful if the directory structure is very deep. Most of the time I need `--depth=1`, but not all the time. I can't set alias to `du="dust --depth=1"` because if I want to use a different value, it will cry about it: "The argument '--depth <depth>' was provided more than once". The easiest solution would be to add a default value in the config (`depth`) and it would work the same way as other options: 1. If `--depth` is defined, use that value. 2. If `depth` is defined in config, use that value. 3. Otherwise use `usize::MAX` (that's the default now). Is there a way to achieve it and I just couldn't figure it out or it's a missing feature. If it's a missing feature, I have a branch with it locally so I can file a PR anytime.
zhus closed this issue 2026-06-08 11:25:50 +03:00
Author
Owner

@bootandy commented on GitHub (Mar 5, 2023):

this seems reasonable to me.

<!-- gh-comment-id:1455043656 --> @bootandy commented on GitHub (Mar 5, 2023): this seems reasonable to me.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bootandy/archived-dust#137