You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The option to toggle the display of the number of items in a directory is already available in the TUI by pressing c, but the items column is always hidden by default. There's no CLI option to show that column in the TUI and in non-interactive and export output modes, and also no way to set that in the gdu.yaml config file.
Describe the solution you'd like
Allow a CLI option, such as --show-counts/-C, and corresponding config file setting show-counts: true to enable showing the number of items column by default (in JSON output, include explicit items property instead of merely checking array length).
An even better enhancement would be separating "number of items" values into distinct "number of files" and "number of subdirectories" counts (in JSON output, include files and subdirs properties instead of items for directory objects).
The text was updated successfully, but these errors were encountered:
Hi, I took a wack at this (I use the tool and I have programming skills, so why not)
First I decided to do it the long route and the ripple effect of changing the main UI factory (CreateUI) was too much. I got to admit I barely know the project, but that was a fun exercise having to change a bunch of places including a lot of test that use the default factory to create the UI object they work with
The second approach was much more simple and involved using the opts and a setter
I would like to add some unit tests, what would be some test cases to include with it. Please let me know if this approach is appropriate, these are the changes I did (I kept the names consistent with the existing code base):
The option to toggle the display of the number of items in a directory is already available in the TUI by pressing
c
, but the items column is always hidden by default. There's no CLI option to show that column in the TUI and in non-interactive and export output modes, and also no way to set that in thegdu.yaml
config file.Describe the solution you'd like
Allow a CLI option, such as
--show-counts
/-C
, and corresponding config file settingshow-counts: true
to enable showing the number of items column by default (in JSON output, include explicititems
property instead of merely checking array length).An even better enhancement would be separating "number of items" values into distinct "number of files" and "number of subdirectories" counts (in JSON output, include
files
andsubdirs
properties instead ofitems
for directory objects).The text was updated successfully, but these errors were encountered: