Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dkaslovsky/nav
Terminal navigator for interactive ls workflows.
https://github.com/dkaslovsky/nav
cd command-line filesystem interactive ls navigation terminal tui
Last synced: 2 months ago
JSON representation
Terminal navigator for interactive ls workflows.
- Host: GitHub
- URL: https://github.com/dkaslovsky/nav
- Owner: dkaslovsky
- License: mit
- Created: 2023-08-25T01:49:53.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-12T16:46:53.000Z (11 months ago)
- Last Synced: 2024-08-05T10:19:43.034Z (6 months ago)
- Topics: cd, command-line, filesystem, interactive, ls, navigation, terminal, tui
- Language: Go
- Homepage:
- Size: 436 KB
- Stars: 127
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nav
Terminal navigator for interactive `ls` workflows.![alt text](./examples/nav_example.png)
## Overview
`nav` is a terminal filesystem explorer built for interactive `ls` workflows.
It can be used as a standalone TUI or in bash/zsh functions such as```bash
# interactive ls + cd
function nv {
cd "$(nav --pipe "$@")"
}
``````bash
# interactive ls + clipboard
function nvcp {
nav --pipe "$@" | pbcopy
}
``````bash
# interactive ls + multi cat
function nvcat {
nav --pipe "$@" | xargs cat
}
````nav` is intended to be an interactive replacement for `ls` and currently supports some of the most common `ls` options:
long list with full details
`ls -l`
`nav --list` / `nav -l`
show hidden files
`ls -a`
`nav --hidden` / `nav -a`
follow symlinks
`nav --follow` / `nav -f`
These options are available as interactive toggles and can also be invoked on start with the appropriate command line flag ([see below](#full-list-of-commands)).
Human readable file sizes (`ls -lh`), color output (`ls --color`), and a custom sort order are on by default and cannot currently be configured.
In the future, `nav` might support a wider range of `ls` options and configuration.
### Full list of commands
Arrow keys are used to move the cursor.
Vim navigation is available using "h" (left), "j" (down) "k" (up), and "l" (right)."enter": navigates into the directory or returns the
path to the entry under the cursor
"backspace": navigates back to the previous directory"ctrl+x": returns the path(s) to the current entry or all marked entries
"ctrl+d": returns the path to the current directory"i": enters search mode (insert into the path)
"d": enters debug mode (view error details)
"H": enters help mode
"esc": switches back to normal mode or clears search filter in normal mode"ctrl+v": (un)marks an entry for multiselect return
"ctrl+a": (un)marks all entries for multiselect return"a": toggles showing hidden files (ls -a)
"L": toggles listing full file information (ls -l)
"f": toggles following symlinks"e": dismisses errors
"ctrl+c": quits the application with no return value
### Command line flags
--help, -h, -H: display help
--version, -v: display version--search, -s: start in search mode
--pipe: return output suitable for pipe and subshell usage
--follow, -f: toggle on following symlinks at startup
--hidden, -a: toggle on showing hidden files at startup
--list, -l: toggle on list mode at startup--no-color: toggle off color output
--no-status-bar: toggle off bottom status bar menu
--no-trailing: toggle off trailing annotators--remap-esc: remap the escape key to the following value, using
repeated values to require multiple presses## Installation
The recommended installation method is downloading the latest released binary.
Download the appropriate binary for your operating system and architecture from this repository's [releases](https://github.com/dkaslovsky/nav/releases/latest) page or via `curl`:macOS / amd64
```bash
curl -o nav -L https://github.com/dkaslovsky/nav/releases/latest/download/nav_darwin_amd64
```macOS / arm64
```bash
curl -o nav -L https://github.com/dkaslovsky/nav/releases/latest/download/nav_darwin_arm64
```Linux / amd64
```bash
curl -o nav -L https://github.com/dkaslovsky/nav/releases/latest/download/nav_linux_amd64
```Linux / arm64
```bash
curl -o nav -L https://github.com/dkaslovsky/nav/releases/latest/download/nav_linux_arm64
```Windows
```bash
curl.exe -o nav.exe -L https://github.com/dkaslovsky/nav/releases/latest/download/nav_windows_amd64.exe
```
## License
`nav` is released under the [MIT License](./LICENSE).
Dependency licenses are available in this repository's [CREDITS](./CREDITS) file.
## Acknowledgements
`nav` was originally inspired by the excellent https://github.com/antonmedv/walk tool but has deviated significantly and has been written from the ground up to support the current feature set.