-
Notifications
You must be signed in to change notification settings - Fork 588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Respect CDPATH #620
Comments
Without CDPATH support, zoxide is a step backward from the basic |
zoxide is great and it has streamlined my workflow A LOT. Although, in the times before it there were named directories, Please consider the option to process the Thank you. |
+1 1000%, was very surprised when i was trying out zoxide that it did not support CDPATH |
Currently found a workaround using builtin zoxide functions. I have all commonly visited places in zoxide add ~/.bookmarks/* now all these links are in database as if I have visited them. And it's possible to jump to them using zoxide.
It's not automatic, of course, and these directories will be purged from zoxide database over time if you don't enter them. But I think the whole idea of bookmarks is a little bit contradicting zoxide frictionless approach to navigating your filesystem. So I personally decided that this temporary workaround is enough for me and it's better to try to adapt zoxide system: over time all these bookmarks you were manually managing with Anyway, from a project design view, it's bad when users get surprised: after all, it's quite strange that "smarted cd command" doesn't have some functionality of a cd. It would be so cool if zoxide would respect |
A bit annoying for sure, but the workaround described above: function add_cdpath_to_zoxide() {
local pths = ()
for pth in $cdpath ; do
[[ -d "$pth" ]] && pths += ("${pth}"/*(/N))
done
if [[ ${#pths[@]} -gt 0 ]]; then
zoxide add "${pths[@]}"
fi
}
c=~/Code # example zsh named directory
cdpath=( ~c/*(/) ~/Desktop/*(/) ~/Documents/*(/) )
if (( $+commands[zoxide] )) ; then
eval "$(zoxide init zsh)"
add_cdpath_to_zoxide
fi |
Workaround for: ajeetdsouza/zoxide#620
Workaround for: ajeetdsouza/zoxide#620
Workaround for: ajeetdsouza/zoxide#620
Is there any reason it does not support CDPATH?
The text was updated successfully, but these errors were encountered: