MFB (minimal file browser) is a fzf powered bash app to quickly navigate through the filesystem. Initially planned as a rewrite of my python version, I extended it a bit after I discovered how cool fzf is.
git clone https://github.com/rohm1/mfb-fzf.git
echo "source /path/to/mfb-fzf/mfb.sh" >> ~/.bashrc
and use the mfb
command.
key | action |
---|---|
ctrl-c | exit |
ctrl-d | exit |
esc | exit |
ctrl-q | exit and change your shell path to the last selected path |
ctrl-e | open the highlighted file in editor |
ctrl-s | print the name of the highlighted file/directory to stdout and exit. useful for scripting, e.g. cat $(mfb) |
ctrl-t | toggle preview |
input | action |
---|---|
/ + enter | go to / |
~ + enter | go to home |
.. + enter | go .. |
Param | Env var | description |
---|---|---|
-c | MFB_LS_COMMAND | provide an alternative ls command, i.e. gls on MacOS |
-l | MFB_LS_OPTIONS | changes options for ls |
-i | MFB_LINE_INDEX | if you change MFB_LS_OPTIONS you'll need to change it accordingly |
-s | MFB_LINES_TO_SKIP | if you change MFB_LS_OPTIONS you'll need to change it accordingly |
-p | MFB_SHOW_PREVIEW | set it to 0 to disable preview |
Env vars will be evaluated first, and then the CLI args, thus CLI args override env vars.