juftin / browsr

🗂️ a pleasant file explorer in your terminal supporting all filesystems
http://juftin.com/browsr/
MIT License
237 stars 14 forks source link

[Feature Request] Toggle all below #41

Open dhirschfeld opened 7 months ago

dhirschfeld commented 7 months ago

In the filebrowser, clicking on a directory will expand/collapse the immediate children of that directory.

It would be great to have some way to apply that recursively for all folders below the one selected so that, with a single click/key-combo, you could expand (or collapse) everything beneath the selected folder.

juftin commented 7 months ago

This is a neat idea, it might be a difficult one to implement though for a couple reasons:

Recursive closing is actually coming soon with a new Refresh shortcut that refreshes the current directory tree to sync new/deleted files. Recursive closing is a side effect of this feature.

I will think on this one and follow up.

dhirschfeld commented 7 months ago

The TUI framework browsr uses, textual, doesn't current give a way to recursively open directory nodes.

It sounds like this might be a feature request for upstream 🤔

juftin commented 7 months ago

I might be wrong on that one - it looks the the parent of the DirectoryTree, Tree, might actually have some of this functionality. I'll keep digging