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 |
| 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 |
| v | z for vim |
| 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 |
| fasd | Command-line productivity booster. It seeks inspiration from autojump, z and v |
| kn | Navigate folders quickly |
| Dongle | Move around deep directory trees |
| cdwe | cd with env vars |
| slingshot | Lightweight tool to browse files in the terminal |
| ff | Manage favourite folders |
| fastdiract | Quick shell navigation and command execution |
| zm | cd for lazy people |
| qcd | Quickly change directory |
| pm | Switch between projects |
| nav | Quickly navigate through directories |
| menucd | Directory browser and changer |
| jmp | The superior cd |
| gump | Smarter cd command |
Read our verdict in the software roundup.
Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk. You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more. Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form. |


Please read our Comment Policy before commenting.