Minimal terminal file manager/navigator
- Fuzzy filter searching
- Vi key bindings
- Copy, cut and pasting
cd
on exit- Selected files copied to environmental variable and clipboard on exit
Nav does not perform operations such as deleting files (rm
), previewing files (cat
), etc and does not provide an emulator for a command-line interface. These operations are better left for the user's existing command-line to handle. These operations can be done quickly with the copy selections to environmental variable or clipboard feature.
Nav does, however, allow copying and pasting/moving around files because that would be inconvenient using the above method.
For multiple selections you may have to do this:
echo $N | xargs cat # replace cat with program of your choice
go install github.com/lezhou8/nav@latest
Key | Description |
---|---|
hjkl or arrow keys |
Basic navigation |
g, G |
Go to top or bottom |
~ |
Go to home directory |
. |
Toggle hidden files |
/ |
Filter search |
esc |
Exit filter search |
enter |
Accept filter search |
space |
Select |
y |
Copy/yank |
d |
Cut |
p |
Paste |
q |
Quit |
Zsh/Bash
# Call this function whatever you like
# Add to .zshrc, .bashrc, or equivalent
navcd() {
nav "$@"
cd "$(cat "${XDG_CACHE_HOME:=${HOME}/.cache}/nav/.nav_d")" # this line allows cd on exit
export N="$(cat "${XDG_CACHE_HOME:=${HOME}/.cache}/nav/.nav_env")" # this line saves file selection to $N
}
# You can bind it to a key
bindkey -s "^n" "navcd\n"
cd
on exit fff- Fuzzy filter search bubbles list
- Hidden fils file picker