Option to enable auto refresh
First of all, great work! I've found myself using this quite a lot. Before my workflow included a lot of ls, tree, ncdu and other commands and I've now adopted to using broot for all of them.
One workflow I've not been able to reproduce is where I previously did watch tree -aDht /path/to/some/{dir1, dir2, dir3}.
I think there are two potential features in here:
- I'm using watch because it is a file heavy workflow and I'm monitoring what's going on with them. broot has a refresh but requires either hitting F5 or typing refresh (from what I've been able to work out anyway). The feature request here is to add an option to enable auto refresh after say 2 seconds (tree command default). That allows me to glance at the other monitor to see what's happening without needing to switch keyboard focus
- The second potential feature request is an option to expand the entire tree that is visible. I can't work out what rules broot is using to auto hide some directories. In my workflow, I need to see the entire tree. Not everything fits on screen, but that's fine. Ideally, I'll scroll into view the parts of the tree I want to be able to monitor right now and when broot auto refreshes, it keeps the same scroll position. If the tree has changed because a file was added or removed then scroll to the nearest sibling of the file or directory that has been removed. If files or directories were added, stay in the same position and anything that falls outside the view is just not visible now. In most cases I have a sub-tree anyway as shown in the example
{dir1, dir2, dir3}. Here, I am choosing a sub-tree I expect to mostly fit on screen
Auto-refresh using notify, that could be a feature.
Do you mean sending desktop notifications?
No, I mean refreshing on file changes, using a generalization of inotify. This is much more efficient than doing periodical refreshes.
Ah, yes I think that makes sense! My description said refresh but I'd expect something like inotify, there's a notify crate as well.
Yes, I know it (I'm the author of bacon, too)
+1 on this feature request, want it badly for the work I'm currently doing
@zcourts thanks for sharing your watch tree command, using it now.
+1 on auto-refresh.