https://github.com/joknarf/seedee
command line interactive directory navigator with history (bash / ksh / zsh)
https://github.com/joknarf/seedee
Last synced: 9 months ago
JSON representation
command line interactive directory navigator with history (bash / ksh / zsh)
- Host: GitHub
- URL: https://github.com/joknarf/seedee
- Owner: joknarf
- License: mit
- Created: 2024-02-18T10:05:46.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-20T12:13:01.000Z (over 1 year ago)
- Last Synced: 2025-01-07T15:43:02.969Z (11 months ago)
- Size: 112 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-zsh-plugins - seedee - Navigate interactively through directories / history of visited directories using arrow keys from command line. (Plugins / ZSH on Windows)
README
# seedee
Navigate interactively through directories / history of visited directories using arrow keys from command line.
Compatibility : bash / ksh / zsh
(compatible macos / debian / centos / solaris / alpine ...)
* rapidily switch to already visited directories using interactive menu
* use locate (mlocate/plocate) to rapidly cd to any directory
* navigate interactively into directories/history using left/right arrow keys in menu
* directly from command line without any cd command using shift-arrow keys (bash/zsh)
* cd autocompletion with interactive menu (bash)
for a complete next-gen shell experience, see also these projects:
* [nerdps1](https://github.com/joknarf/nerdps1) : auto-transportable dynamic PS1 prompt (you can see it in the demo)
* [redo](https://github.com/joknarf/redo) : replacement of shell history command search (Ctrl+R or Esc+/) with interactive menu
* [complete-ng](https://github.com/joknarf/complete-ng) : nextgen bash completion with interactive menu

* using bash/zsh in emacs or vi mode, key binding is available as shortcuts:
* default key binding with Shift+Arrows or Ctrl+Arrows (can be overridden using CD*BIND variables)
|Left | Up/Down | Right |
|:-----------------------:|:-----------------------------------:|:---------------------------:|
| | previous dir in history | |
| |
| |
|
|
|
|
| parent dir (..) | dir history browser | dir browser |
directory pattern can be put on command line before hitting shortcut to filter result
putting on command line : `work` and hitting Shift+⇧ will bring you to last visited directory containing `work`
|key | action |
|----------------------------------------------|------------------------------------------------------|
|Shift+⇩ | cd history menu |
|Shift+⇧ | return to last directory in history matching pattern |
|Shift+⇨ | navigate from current directory |
|Shift+⇦ | go to parent dir (cd ..) |
|Ctrl+Shift⇩ | search directories matching pattern in locate db |
* using bash, `` cd auto completion can be enabled for `cd` command:
* setting env variable `CDCOMPLETE=y` before sourcing `seedee`
## keys when in menu
|key | action |
|--------------------------------|-------------------------------------------------------|
|⇩ | select next item |
|⇧ | select prev item |
|End | select last item |
|Home | select first item |
|⇨ | browse selected directory |
|⇦ | browse parent directory |
|Shift+⇨ | browse selected directory with subdirectories depth 4 |
|Shift+⇦ | back to only show subdirectories depth 1 |
|Shift+⇩/PgUp/Ctl+F| next page |
|Shift+⇧/PgDn/Ctl+B| previous page|
|Del/F8 | delete directory entry in history |
|Esc | exit |
|Ctrl+A | use all screen to display menu |
|Enter/Tab | go to directory |
* filter pattern can be applied entering text
* selection can be done entering item number
# usage
```
$ . ./seedee
$ cd
=> change to and add to $CDHISTFILE
$ cd --
=> display current history / choose dir to change
$ cd -- ...
=> search pattern in current history, change to dir if unique, display / chose dir either
$ cd - ...
=> search pattern in cd history, change to dir first matched
$ cd + []...
=> display immediate subdirectories of cwd, search / choose dir to change (except dot dirs, like .git/*)
$ cd ++ []...
=> display subdirectories until depth 4, search / choose dir to change (except dot dirs, like .git/*)
$ cdl ...
=> use locate -r and get list of directories to switch
```
`cd - ` `cd -- ` `cd + ` `cd ++ ` are aliases to `cd- cd-- cd+ cd++`
# environment variables
|Variable | Description |
|-------------|-------------------------------------------------------------------|
|`CDHISTFILE` | path to history file (default to ~/.cd_history) |
|`CDNBDIRS` | Number of directories in history to display (default 10) |
|`CDINITDIRS` | Directory list (\n separated) to initialize CDHISTFILE if empty |
|`CDPOWERLINE`| set to "n" to disable powerline symbol usage |
|`CDHISTBIND` | bind key to cdhist |
|`CDDOTBIND` | bind key to navigate from current dir |
|`CDLBIND` | bind key to cdlocate |
|`CDUPIND` | bind key to cd .. |
|`CDLASTBIND` | bind key to cdhist last dir matching text |