eza-community / eza

A modern alternative to ls
https://eza.rocks
European Union Public License 1.2
12.41k stars 219 forks source link

feat: Add --indicate-deeper-levels Flag to eza --tree #1223

Open SamuelBorn opened 2 weeks ago

SamuelBorn commented 2 weeks ago

Current Issue: Using eza --tree --level=n currently provides no indication of additional nested levels, which can lead to confusion about directory contents when only a limited depth is shown.

Proposed Solution: Introduce a --indicate-deeper-levels flag to mark directories that have further levels beyond the specified depth. A simple indicator (e.g., ...) would clarify that deeper levels exist, improving clarity without altering the specified --level setting.

Example

Original Folder Structure

.
├── a
└── b
   ├── c
   └── d
      └── e

Output of eza --tree --level=1

.
├── a
└── b

Wanted behavior of e.g. eza --tree --level=1 --indicate-deeper-levels

.
├── a
└── b
   └── ...
cafkafk commented 1 week ago

I'd prefer it being more compact graphically, e.g.

.
├── a
└── b...

Or making use of unicode elipsis

.
├── a
└── b…
cafkafk commented 1 week ago

And honestly, if this could be implemented without a runtime impact on the already pretty slow --tree flag, it may be worth just making this a default, I think we can be that opinionated :p

SamuelBorn commented 1 week ago

I'd prefer it being more compact graphically

Yeah that looks also better to me!