nav

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2024 License: MIT Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

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

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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址