SD is a command-line directory navigation utility for ksh, Bash and Zsh.
It behaves like cd when given a valid pathname, while adding pattern-based navigation through a dynamically ranked directory stack. Unlike many directory jumpers that store only an aggregate score for each location, SD retains an explicit history of directory-change events. Rankings can therefore be recalculated when scoring parameters change without discarding that history. Its scoring model combines frequency and recency over a configurable trailing window, and repeated searches using the same pattern cycle predictably through matching directories in rank order. The repository is maintained as a read-only snapshot of stable project states.
This is free and open source software.
Key Features
- Records directory changes in a persistent logfile.
- Maintains in-memory history including visits not yet written to disk.
- Uses a configurable exponential aging kernel, with a power-law model available as an alternative.
- Uses event order rather than elapsed wall-clock time when calculating recency.
- Matches regular expressions against complete directory paths with smart-case handling.
- Falls back to lower-ranked candidates when a matching directory no longer exists.
- Can search retained history when ranked matches are stale.
- Provides a ds command for inspecting and managing the directory stack.
- Can use fzf for interactive selection between matching locations.
- Allows independent limits for retained history and the scoring window.
- Lets users adjust scoring parameters and stack limits while the shell is running.
- Provides facilities for cleaning stale entries and inspecting configuration.
- Uses logfile locking to coordinate concurrent shells.
- Detects naming conflicts with other commands called sd and leaves the existing command untouched.
- Preserves standard path handling for absolute and relative paths, parent directories and home-directory expansion.
Website: github.com/jghub/sd-switchdir
Support:
Developer: jghub
License: MIT License
Related Software
| Shell tools | |
|---|---|
| fzf | Command-line fuzzy finder for your shell |
| zoxide | Smarter cd command, inspired by z and autojump |
| broot | Reviewed under our Excellent Utilities series |
| McFly | Also reviewed under our Excellent Utilities series |
| z | Maintains a jump-list of the directories you actually use |
| autojump | Offers a fast way to navigate your filesystem |
| z.lua | Helps you navigate faster by learning your habits |
| HSTR | Bash and zsh shell history suggest box |
| Zsh-z | Fast directory jumping based on frecency |
| enhancd | Next-generation cd command |
| fzy | Simple, fast fuzzy finder for the terminal |
| Navita | Rapid directory traversal |
| Jump | Quick and fuzzy directory jumper |
| walk | Simple and minimalistic terminal navigator |
| lacy | cd alternative that makes navigating much more efficient |
| DF-SHOW | Directory File Show |
| fz | Adds fuzzy search to tab completion of z |
| pazi | Fast autojump helper |
| jumper | Files/directories jumper |
| cdhist | Linux shell cd history directory stack |
| icd | Shell utility that makes changing directories quicker and more convenient |
| SD | Dynamic directory navigation from the command line |
| Dongle | Move around deep directory trees |
| cdwe | cd with env vars |
| fastdiract | Quick shell navigation and command execution |
| zm | cd for lazy people |
| slingshot | Lightweight tool to browse files in the terminal |
| qcd | Quickly change directory |
| nav | Quickly navigate through directories |
| menucd | Directory browser and changer |
| kn | Navigate folders quickly |
| jmp | The superior cd |
| gump | Smarter cd command |
Read our verdict in the software roundup.
LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more. Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion. Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README. |


Please read our Comment Policy before commenting.