I always loved the overview you can get from a tree like view. But tree
is almost never usable, because it usually generates pages (or hundreds of pages) of output.
tree
is also not interactively searchable and of course doesn't act as a launcher.
tree
was one of the starting point in the reflection. fzf
was another one, I can't live without fuzzy search anymore.
And thus I made broot which I use all the time, which lets me go to any directory or file with a few keystrokes and faster than any other one.
It's ready for general consumption, now, but I'm still thirsty for feedback.
broot can be launched with commands, which allows for example non interactive shortcuts like this one:
If any rust expert is around, I'd love to discuss the code, especially any ideas of micro-optimizations (the development of such a program is all about speed).
Broot
A better way to navigate directories
Complete Documentation - Installation Instructions - Contributing or Getting Help
Get an overview of a directory, even a big one
Hit br -s
Notice the unlisted?
That's what makes it usable where the old tree
command would produce pages of output.
.gitignore
files are properly dealt with to put unwanted files out of your way.
As you sometimes want to see gitignored files, or hidden ones, you'll soon get used to the alti and alth shortcuts to toggle those visibilities.
(you can ignore them though, see documentation).
Find a directory then cd
to it
type a few letters
Hit altenter and you're back to the terminal in the desired location.
This way, you can navigate to a directory with the minimum amount of keystrokes, even if you don't exactly remember where it is.
Broot is fast and doesn't…
Top comments (11)
I am broot.
This is neat! I don't know if there's really an "interactive
tree
"-shaped hole in how I navigate filesystems but it's always fun to see a new take on the basics.Suggestion: ctrl+j/k to move the cursor down/up for the vi people?
Good suggestion. The :q and such should already help vi people (like me) at home.
Radical, works for me. Added the bash script too.
May I suggest adding the following to cargo.toml?
While not in a "tree" structure, why not something like
z
with fzf. that will allow me to go to or edit a file pretty quicklyz
? I'm sorry, I don't see what you refer to (my knowledge of fzf is quite limited).theres a tool called
z
where i can type sayz folderName
and it will jump to a directory that I have been to in the past withcd
. just typingz
will show me all the directories I have been to recently, ranked by how often I go to them.fzf
is a pretty terminal ui for finding files (in picture). Though,fzf
has a lot of other great uses found here:github.com/junegunn/fzf
I was just curious why you didn't use those. But if you were not familiar with them, that makes sense. I could do most of what you do with fzf and z. However, I do really like what you have made here. What I like is the tree like structure. I have installed it and was playing with it earlier. Good work. I'll have to keep it.
I'm familiar with fzf for finding files, and I used it a lot before to use broot, it's a great tool (and one of those innovations which inspired a lot of other ones). But I didn't knew of
z
.nice thing man, although iam not into rust
What? Why? :O
Great work, man! Will try.