Open FFdhorkin opened 2 years ago
As a potentially (un)related side note: when I'm in the ~ls
folder, z ser
jumps to ~als
, rather than ~ls/src/LASERService
.
Likewise, when I'm in the ~als
, folder, z ser
jumps to ~ls
, rather than ~als/src/LASERService
I've tried various options of _ZO_FZF_OPTS
with --tiebreak
, but it doesn't seem to help. Surely a subfolder should be prioritized over another folder with a similar name?
I'm looking for an easy way to make ambiguous directories play nice with zoxide without needing to use a different tool. There are quite a few zsh plugins for "bookmarking" or "favoriting" folders, but I don't want to have to remember to use a different command to jump to those folders - I want to use the familiar
z
syntax.zsh has a built in feature called named directories that should be able to solve this, but zoxide doesn't seem to consider them unless you explicitly put the ~.
For example, I currently am working in an environment where I have to use some awkward naming conventions. I'm not sure whether zoxide or I hate these conventions more :P
I've anonymized these paths to make my point without using the actual names (this is the exact number and structure they actually have, though. Thankfully, the folders under
**/ant_*/**/*
will be going away soon). I'm not surprised zoxide doesn't really know what to do with these - to the human eye, it's also pretty easy to misread them.but we're talking the difference between something along the lines of
LASERService
andLSRService
, and it just gets worse from there. These are all source code folders:Have you reached semantic saturation looking at that list? I certainly did itemizing all the folders!
To wrangle this a bit, I've created some of those ~ named directory aliases by adding this to my .zshrc (note that since LASER isn't the actual app name, I'm not shadowing
ls
... which would be a horrible idea):Now I can at least go
z ~ls ser
to go to/some/shared/path/laser_service/src/LASERService
z ~als ser
to go to/some/shared/path/ant_laser_service/src/LASERService
etc.but these error out with
zoxide: no match found
, and I can't see why they zoxide can't figure it out, even with COMPLETE_ALIASES enabled:z ls ser
z als ser
TL;DR: please make zoxide search zsh's ~ named directories without requiring the tilde! It might not seem like much, but it's very easy to forget the tilde