Skip to content

onioncall/gonav

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GONAV


This is a lightweight tool meant to speed up navigating directories in the terminal.

Commands


     s                       - focus in search bar
     spacebar, right arrow   - go into directory
     b, left arrow           - exit directory
     enter                   - cd into selected directory
     esc                     - if focused in search, focuses in directory box
     tab                     - toggles between search and directory box, can be used in place of s and esc depending where cursor focus is
     esc                     - if not focused in search, exits application without changing directory

     when searching for a directory, if there is only one result 'enter' will cd you to that directory and exit the application, and 'spacebar' will navigate you into that directory
Screen.Recording.2025-07-09.at.10.33.47.PM.mov

Setup


move the binary (gonav file) and add it to your bin if you'd like to build it yourself

sudo go build -o /usr/local/bin/gonav .

otherwise

sudo cp gonav /usr/local/bin/gonav 

add the following to your shell rc file (.bashrc, .zshrc, etc)

gonav() {
   local dir=$(command gonav)
   if [ ! -d "$dir" ]; then
       echo "gonav: not a valid directory: $dir" >&2
       return 1
   fi
   
   cd "$dir"
}

Configuration


Create a config file at ~/.config/gonav/config.json to customize keybindings, here are the defaults as a template

{
  "searchToggle": ["tab"],
  "focusSearch": ["s"],
  "selectDirectory": ["enter"],
  "enterDirectory": [" ", "/"],
  "exitApplication": ["esc", "q", "ctrl+c"],
  "up": ["up", "k"],
  "down": ["down", "j"],
  "into": ["right", "l", "/", " "],
  "outOf": ["left", "b"]
}

To be clear, if you like the defaults you do not need to add this file

About

Navigate Directories In The Terminal With Go

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages