Categorygithub.com/lezhou8/nav
repositorypackage
0.1.0
Repository: https://github.com/lezhou8/nav.git
Documentation: pkg.go.dev

# README

nav

About

Minimal terminal file manager/navigator

Features

screenshot filter yank

Minimalism

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.

select_demo

Nav does, however, allow copying and pasting/moving around files because that would be inconvenient using the above method.

Installation

go install github.com/lezhou8/nav@latest

Key binds

KeyDescription
hjkl or arrow keysBasic navigation
g, GGo to top or bottom
~Go to home directory
.Toggle hidden files
/Filter search
escExit filter search
enterAccept filter search
spaceSelect
yCopy/yank
dCut
pPaste
qQuit

cd on exit and copy file selections to environmental variable

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"

Built with

Dependencies

Acknowledgement