When you start broot, the current directory is displayed, with most often some directories open and some lines truncated, in order to fit the available height.
The first line is called the root, and is currently selected.
From here you may navigate using the following keys:
- ↓ or ↑ : select the next or previous line
- ctrl← or ctrl→ : focus (or open) a panel to the left or to the right
- ⏎ on a file : open the file using xdg-open (or your OS equivalent)
- alt⏎ on a file : leave broot and open the file using xdg-open
- ⏎ on a directory : focus the directory (i.e. make it the new root)
- alt⏎ on a directory : leave broot and
cdthe shell to that directory.
- ⏎ on the first line : goes up one level (focus the parent directory)
- esc gets you back to the previous state (or leave broot if there's none)
- ? brings you to the help screen
There are also a few more shortcuts:
- you can quit with Ctrlq
- you can select a line with a mouse click
- you can open a line with a mouse double-click
The best way to navigate is by filtering the tree.
This is done simply by typing a few letters.
The pattern filters the tree while you type. It's interpreted in a fuzzy way so that you don't have to type all the letters or even consecutive letters. The best match is automatically selected.
Hitting esc clears the current pattern.
If there's a
/ before or after the patten, it's interpreted as a regular expression.
/pat+ern would match
"some_patttern.rar" but not
If you want the regex to be case insensitive, add the
File content searches
To display only files containing
(as the search is displayed in real time you'll usually stop as soon as you have the right matches)
Simple patterns can be composed with the
For example, if you don't want to see files whose name ends in
"rs", you may type
!/rs$ (it's the negation of the
/rs$ regular expression).
And if you want to see all files containing
"pattern" but not the rust ones, you'll type
More about searches
If you want to know more about the exact pattern syntax, see reference.
When you search in broot in a very big directory on a slow disk, broot doesn't always look at all files. It stops when it found enough matches and then rates those matches.
If you think there might be a better match, hidden deeper, you may require a total search, which is a search which look at all files. This is done using the
:total_search verb, which may be triggered with the Ctrl-S key combination (you may redefine it, see configuration).
As for other searches, it's interrupted as soon as you type anything.
Flags are displayed at the bottom right of the panel, showing the settings regarding hidden files and .gitignore rules.
Initially, broot doesn't show files whose name starts with a dot, or files declared as ignored by a
.gitignore file. Permissions and file sizes aren't shown.
This behavior is tuned with several toggles.
|toggle_files||files||toggle showing files (or just folders)|
|toggle_git_file_info||gf||toggle display of git file information|
|toggle_git_ignore||gi||toggle use of .gitignore|
|toggle_hidden||h||toggle showing hidden files|
|toggle_perm||perm||toggle showing file permissions|
|toggle_sizes||sizes||toggle showing sizes|
|toggle_trim_root||t||toggle removing nodes at first level too (default)|
To apply one, just type a space (or
:), then the start of its shortcut, then hit ⏎.
For example typing
:s then enter will show file and directory sizes:
You may notice a scrollbar on this screenshot. The first level of the tree is always uncut when you display sizes (you're in a special "whale spotting" mode).
Not trimming the root is also possible in normal mode by using the
The displayed size on unix is the space the file takes on disk, that is the number of blocks multiplied by the size of a block. If a file is sparse, a little 's' is displayed next to the size.
Other than executing a command leaving broot, there are several ways to quit:
- if the current root is selected, just hit
- hit ctrl+Q