/nav

The interactive and intuitive replacement for ls & cd!

Primary LanguageKotlinMIT LicenseMIT

📂 nav 📂

The interactive and stylish replacement for ls & cd!

nav demo

nav demo filter


Ever tried to find that one config file hidden deep in your directory tree? Or maybe you just want to quickly jump to a directory and inspect some files on the way?
nav is here to help! ✨
Written in Kotlin/Native, nav provides a modern and intuitive terminal UI to navigate your filesystem.

  • ➡️ Use arrow keys to navigate everywhere
  • ⌨️ Type to filter entries, press Tab to autocomplete
  • ✏️ Instantly edit files with your favorite editor
  • 📈 Create files and directories or run commands everywhere
  • ✅ Press Enter to move your shell to the current directory

🚀 Installation

1. Install nav

Select your operating system

Linux

Install (or update) nav with the installer script:

curl -sS https://raw.githubusercontent.com/Jojo4GH/nav/master/install/install.sh | sh

Or install with any of the following package managers:

Distribution Repository Instructions
Arch Linux AUR pacman -S nav-cli
yay -S nav-cli

Or manually download the latest release.

Windows

On Windows, you can use scoop to install nav:

scoop bucket add JojoIV "https://github.com/Jojo4GH/scoop-JojoIV"
scoop install nav

Or without adding the bucket:

scoop install "https://raw.githubusercontent.com/Jojo4GH/scoop-JojoIV/master/bucket/nav.json"

2. Set up your shell

Configure your shell to initialize nav. This is required for the cd part of nav's functionality.

Bash

Add the following to the end of ~/.bashrc:

eval "$(nav --init bash)"
Zsh

Add the following to the end of ~/.zshrc:

eval "$(nav --init zsh)"
Powershell

Add one of the following to the end of your PowerShell configuration (find it by running $PROFILE):

Invoke-Expression (& nav --init powershell | Out-String)
Invoke-Expression (& nav --init pwsh | Out-String)

🔧 Configuration

The default location for the configuration file is ~/.config/nav.toml. You can change this by setting the NAV_CONFIG environment variable:

Linux
export NAV_CONFIG=~/some/other/path/nav.toml
Powershell
$ENV:NAV_CONFIG = "$HOME\some\other\path\nav.toml"

The default configuration looks as follows:

editor = "nano"
hideHints = false
clearOnExit = true

limitToTerminalHeight = true
maxVisibleEntries = 20      # Set to 0 for unlimited entries
maxVisiblePathElements = 6
# Used to distinguish escape sequences on Linux terminals
inputTimeoutMillis = 4      # Set to 0 for no timeout
suppressInitCheck = false

[keys]

submit = "Enter"
cancel = "Escape"

cursor.up = "ArrowUp"
cursor.down = "ArrowDown"
cursor.home = "Home"
cursor.end = "End"

nav.up = "ArrowLeft"
nav.into = "ArrowRight"
nav.open = "ArrowRight"

menu.up = "PageUp"
menu.down = "PageDown"

filter.autocomplete = "Tab"
filter.clear = "Escape"

[colors]

path = "00DBB7"
filter = "00DBB7"
filterMarker = "00DBB7"
keyHints = "FFFFFF"

permissionRead = "F71674"
permissionWrite = "F5741D"
permissionExecute = "009FFD"
entrySize = "F5741D"
modificationTime = "009FFD"

directory = "F71674"
file = "F5741D"
link = "009FFD"

[modificationTime]
minimumBrightness = 0.4
halfBrightnessAtHours = 12.0

For valid key names see web keyboard event values.

Known Issues

  • On Linux terminals the escape key is send as ESC which can also be the start of escape sequences to define other keys (e.g. arrow keys). This has the effect that the escape key can not be distinguished and will not work as intended on those platforms (may get resolved with this issue). Escape keys must therefore be recognized with a small timeout leading to a small delay.

  • Symbolic link destinations are not shown and handled weirdly.

❤️ Powered by