pls
pls copied to clipboard
Add a tree view
Problem
One of the most requested features lacking in pls
but present in its main competition, exa is a tree view.
Description
A tree view is very useful to see the contents of a directory, and it's subdirectories, and their subdirectories and so on in a single view.
exa has this feature, accessible with the --tree
flag but pls
does not. Adding it would close the gap, making pls
's features a superset of exa.
Additional context
- The feature must be compatible with the details view.
- It must override and disable collapse mode.
The tree view has been experimentally added in main
as of commit 02303aa, utilising the refactoring efforts of prior commits.
Currently it is does not have very good performance and becomes very slow when there are lots of files in a directory (or its descendants) but work on improving that is underway. But at least, we now have all the features of exa, and more!
Hi @dhruvkb,
Listing directories recursively is an already heavy task. Instead of printing the entire result out in a go (I see you're using glob
), generating and pretty printing the results as the directories are traversed could make it seem to appear quicker.
Something similar to the tree
command on Windows
I could have a go at it, if I were assigned. Do let me know if this issue is up for grabs.
https://user-images.githubusercontent.com/94926409/230444125-2bde9fa9-e7f5-4e65-8c67-2f60967b67fd.mov