dduan / tre

Tree command, improved.
MIT License
736 stars 16 forks source link

Non-hidden files in a hidden root directory not listed #54

Closed JaSpa closed 3 years ago

JaSpa commented 3 years ago

Thank you for this delightful utility!

I have the following folder structure:

> tre -a
.
├── some-file
└── .hidden-dir
    ├── regular
    └── .hidden

Running tre without the -a flag behaves as expected, showing only some-file.

When I pass a specific root path I expect tre to list the non-hidden files in that directory, regardless if the root is hidden or not, or if the -a flag is specified or not:

# Actual behaviour
> tre .hidden-dir
.hidden-dir

# Expected behaviour
> tre .hidden-dir
.hidden-dir
└── regular

Passing -a would then also list the hidden files in that specific directory:

> tre -a .hidden-dir
.hidden-dir
├── .hidden
└── regular

Edit: This expected behaviour is how tree works.