gdu
gdu copied to clipboard
`--show-item-count` ignored in `--non-interactive` mode
First of all, thanks for developing gdu, it’s a fantastic tool!
Describe the bug
When running in non-interactive mode (-n), the --show-item-count (-C) flag appears to have no effect: item counts are not displayed.
To Reproduce
Simple example:
tmp=$(mktemp -d)
mkdir -p "$tmp"/{a,b,c}
touch "$tmp"/a/{1..5}
touch "$tmp"/b/{1..10}
touch "$tmp"/c/{1..15}
Interactive (counts visible):
gdu -C "$tmp"
Non-interactive (counts missing):
gdu -n -C "$tmp"
Output
4.0 KiB /c
4.0 KiB /b
4.0 KiB /a
Expected behavior
In non-interactive mode, each directory line should include the item count (like in interactive mode), enabling use in scripts.
System (please complete the following information):
- OS: Fedora 42
- Terminal: Konsole / Ghostty
- Version: gdu v5.31.0 (Built time: Fri Jun 6 11:27:29 AM CEST 2025, Built user: dundee)
Additional context
If item counts are intentionally interactive-only, a note in the help/docs would be great.
Otherwise, supporting --show-item-count in --non-interactive mode would be very useful.