|
|
|
|
|
by 1718627440
107 days ago
|
|
Thanks for the explanation. Do you really have hundreds of projects you work at at the same time? > For example, I can reach .../client-a/src just by typing 'sd ent-a'. The algorithm disambiguates based on the ranking; if the top match is ever wrong (it rarely is for me), you can just do ^P <CR> (recall and re-run) to jump to the 2nd highest match. CTRL-R can also do this, or does this tool also do partial matches, e.g. 'tas' matches '.../client-a/src' ? |
|
It does not use "fuzzy" sub-sequence matching (pooling 't', 'a', and 's' from different path segments). For .../client-a/src, you wouldn't use 'sd tas', but rather 'sd t-a' or 'sd a/src'.|
would also be a valid jump.Regarding CTRL-R:
* Filtering Noise: CTRL-R searches raw, chronological history. sd builds a scored directory stack from your history. You are querying a ranked index of destinations, not a linear tape of commands. This allows jumping to a directory visited 200 actions ago without scrolling through history with CTRL-R.
* Ranking Logic: CTRL-R is strictly chronological. sd uses a power-law "aging" model. If client-a is a daily driver and client-b was a one-off visit, sd correctly prioritizes client-a for a 'src' query, even if it wasn't the absolute last place visited.
* Spatial Cache: I don't work on 100 projects at once, but I do touch a "long tail" of ~100 distinct paths over several weeks/months (logs, build dirs, repos). sd acts as a cache for these nesting depths so I don't have to recall them.
Ultimately, you just provide a modestly specific pattern — 'sd t-a/s' or 'sd src' -- and the ranking handles the disambiguation.