ajeetdsouza / zoxide

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

fix resolves symlink on `cd` at zsh #777

Open dalton-oliveira opened 6 months ago

dalton-oliveira commented 6 months ago

Description

Having _ZO_RESOLVE_SYMLINKS env var defined as "1", makes zoxide to chase symink of directory before adding it to the database. This behavior can be more coherent if the cd command also does the same. That's specially useful for APFS which is case insensitive by default. Closes #740.

What was done

Adds CHASE_LINKS option to cd, the same one used in pwd on zsh.

dalton-oliveira commented 6 months ago

@ajeetdsouza thank you for this amazing tool! It has already saving me a lot of keystrokes. Hope this PR is adequate and thanks for taking a look.

jesseleite commented 6 months ago

Tested this branch using @dalton-oliveira's instructions here and it seems to totally fix my issue in #740 😍

ajeetdsouza commented 6 months ago

@dalton-oliveira just one question - why do we not use cd -P on Windows?

dalton-oliveira commented 6 months ago

@ajeetdsouza I was concerned to break something that I couldn't check manually. Just removed the conditional

jesseleite commented 5 months ago

Thanks for doing this @dalton-oliveira! ❤️

jesseleite commented 5 months ago

Just tested again since that last commit. Still works great / fixes my MacOS case sensitivity issues in #740 👍

duncanmcclean commented 4 months ago

I have a similar issue to @jesseleite - would love to see this merged! 😄

dalton-oliveira commented 4 months ago

Hey @ajeetdsouza have just rebased with main. It's been here for a while so please feel free to reject the PR if you doesn't intent to merge it :)

jesseleite commented 4 weeks ago

Thoughts on this one @ajeetdsouza? ...Would be huge little thing for us MacOS users, and it works great! 🙏🙏🙏

PS. Appreciate all you do! ❤️