[GH-ISSUE #536] Config file does not support the collapse option #236

Closed
opened 2026-06-08 11:26:16 +03:00 by zhus · 5 comments
Owner

Originally created by @ofek on GitHub (Nov 19, 2025).
Original GitHub issue: https://github.com/bootandy/dust/issues/536

Hey there, thanks for this great tool! I'm trying to add it to our developer environments with certain directories collapsed by default like .git but only the flag appears to work.

❯ dust -bn 4 -d 2 --collapse .git
 29M   ┌── test
 55M   ├── .git
 41M   │ ┌── dyninst
149M   ├─┴ pkg
309M ┌─┴ .

❯ $env.DC
/root/.config/dust/config.toml

❯ echo "collapse=\".git\"\n" o> $env.DC; cat $env.DC; dust -bn 4 -d 2
collapse=".git"
 53M     ┌── objects
 55M   ┌─┴ .git
 41M   │ ┌── dyninst
149M   ├─┴ pkg
309M ┌─┴ .

❯ echo "collapse=[\".git\"]\n" o> $env.DC; cat $env.DC; dust -bn 4 -d 2
collapse=[".git"]
 53M     ┌── objects
 55M   ┌─┴ .git
 41M   │ ┌── dyninst
149M   ├─┴ pkg
309M ┌─┴ .
Originally created by @ofek on GitHub (Nov 19, 2025). Original GitHub issue: https://github.com/bootandy/dust/issues/536 Hey there, thanks for this great tool! I'm trying to add it to our developer environments with certain directories collapsed by default like `.git` but only the flag appears to work. ``` ❯ dust -bn 4 -d 2 --collapse .git 29M ┌── test 55M ├── .git 41M │ ┌── dyninst 149M ├─┴ pkg 309M ┌─┴ . ❯ $env.DC /root/.config/dust/config.toml ❯ echo "collapse=\".git\"\n" o> $env.DC; cat $env.DC; dust -bn 4 -d 2 collapse=".git" 53M ┌── objects 55M ┌─┴ .git 41M │ ┌── dyninst 149M ├─┴ pkg 309M ┌─┴ . ❯ echo "collapse=[\".git\"]\n" o> $env.DC; cat $env.DC; dust -bn 4 -d 2 collapse=[".git"] 53M ┌── objects 55M ┌─┴ .git 41M │ ┌── dyninst 149M ├─┴ pkg 309M ┌─┴ . ```
zhus added the good first issue label 2026-06-08 11:26:16 +03:00
zhus closed this issue 2026-06-08 11:26:17 +03:00
Author
Owner

@bootandy commented on GitHub (Nov 21, 2025):

I didn't think anyone would ever want a config option for that. Happy to add it if you want it.

<!-- gh-comment-id:3560429923 --> @bootandy commented on GitHub (Nov 21, 2025): I didn't think anyone would ever want a config option for that. Happy to add it if you want it.
Author
Owner

@bootandy commented on GitHub (Nov 21, 2025):

just to be clear :

the command line option: --collapse works correctly.

You want this option to be added to config as well ?

<!-- gh-comment-id:3560461041 --> @bootandy commented on GitHub (Nov 21, 2025): just to be clear : the command line option: `--collapse` works correctly. You want this option to be added to config as well ?
Author
Owner

@ofek commented on GitHub (Nov 21, 2025):

Yes, please! I'm unfamiliar with the code base, is there any reason to not support every option in the config file?

<!-- gh-comment-id:3560467649 --> @ofek commented on GitHub (Nov 21, 2025): Yes, please! I'm unfamiliar with the code base, is there any reason to not support every option in the config file?
Author
Owner

@bootandy commented on GitHub (Nov 21, 2025):

No reason. I just didn't think anyone would want to have a directory collapsed permanently so I never added it.

<!-- gh-comment-id:3560476609 --> @bootandy commented on GitHub (Nov 21, 2025): No reason. I just didn't think anyone would want to have a directory collapsed permanently so I never added it.
Author
Owner

@bbugh commented on GitHub (Jan 9, 2026):

Thank you for adding and releasing this (and all your work on dust)! I just came to investigate why it wasn't working for me as well. It's working great in 1.2.4:

> cat ~/.config/dust/config.toml
collapse=[".git","node_modules"]
<!-- gh-comment-id:3729427865 --> @bbugh commented on GitHub (Jan 9, 2026): Thank you for adding and releasing this (and all your work on dust)! I just came to investigate why it wasn't working for me as well. It's working great in 1.2.4: ```bash > cat ~/.config/dust/config.toml collapse=[".git","node_modules"] ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bootandy/archived-dust#236