Skip to content

easyfold/select-directory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

select-directory

A terminal directory picker with fuzzy search. Prints the selected path to stdout — designed to pair with cd via a shell wrapper.

Usage

select-directory --prefix <path> [--search-depth <n>] [--disable-recent]
Flag Default Description
--prefix required Root directory to scan
--search-depth 1 Levels deep to scan (1 = direct children)
--disable-recent false Disable recent-history priority

Keys

Key Action
Type Filter directories (fuzzy match)
be/abc Search within be/ for abc
Ctrl+N / ↓ Move down
Ctrl+P / ↑ Move up
Enter Select
Esc / Ctrl+C Cancel (outputs empty string)

Shell Integration

Add to ~/.zshrc or ~/.bashrc:

function sd() {
  local dir
  dir=$(select-directory --prefix "${1:-$HOME}")
  [[ -n "$dir" ]] && cd "$dir"
}

Usage: sd ~/projects or sd (searches from $HOME).

History

Recently visited directories are stored in ~/.config/select-directory/history (max 200 entries). Use --disable-recent to sort purely alphabetically.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors