ajeetdsouza / zoxide

A smarter cd command. Supports all major shells.
MIT License
22.55k stars 548 forks source link

support path alias? #608

Closed pedoc closed 1 year ago

pedoc commented 1 year ago

For example, can I do

zoxide add C:\aaaa\bbbbb\cccc\dddd nice-name
z nice-name //This will jump to C:\aaaa\bbbbb\cccc\dddd
ajeetdsouza commented 1 year ago

This seems much better served by just a regular alias:

alias nice-name='cd "C:\aaaa\bbbbb\cccc\dddd"'

That way, you can also back it up with the rest of your dotfiles. zoxide is meant to be automatic - the user should not have to think about setting up aliases manually.

eugenesvk commented 10 months ago

Your suggestion of using regular aliases breaks the universal nature of the "z to cd workflow", so that's why it'd be better to set up an alias as z nice-name rather then nice-name

While the automatic nature of z is a nice default, the is still an issue that it's not 100% predictable, which aliases solve - you can always be certain to z to a given frequent dir regardless of its frecency match (besides the other benefit of a more convenient name)