Skip to content
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

Using --cmd cd in Fish Shell does not work #856

Closed
EvilsSouls opened this issue Jul 14, 2024 · 6 comments
Closed

Using --cmd cd in Fish Shell does not work #856

EvilsSouls opened this issue Jul 14, 2024 · 6 comments

Comments

@EvilsSouls
Copy link

I wanted to switch from cd to zoxide. So that I could keep my muscle memory I wanted to also replace the z (and zi) command with cd. Thus instead of just adding zoxide init fish | source I changed it to zoxide init --cmd cd fish | source. I restarted my terminal and first checked if the command z is still a thing. Sure enough it wasn't. Then I used cd, however instead of it just behaving as the original z command it gave this error:
image

Removing the --cmd cd from the config.fish file fixes it again.

PS: If it wasn't obvious already I'm using fish as my shell

@EvilsSouls
Copy link
Author

EvilsSouls commented Jul 14, 2024

If it helps, I originally tried just doing zoxide init --cmd cd from the terminal (after I had added it to the config.fish file), because I wasn't sure where to actually do the command. So that might be the root of the problem. (Even though I don't actually think so, because the command just spat out what it would normally do inside the actual config.fish file.)

@ajeetdsouza
Copy link
Owner

What version of zoxide are you running?

zoxide -V

@EvilsSouls
Copy link
Author

What version of zoxide are you running?

zoxide -V

zoxide v0.4.3-unknown. I installed it yesterday through apt.

@EvilsSouls
Copy link
Author

What version of zoxide are you running?

zoxide -V

zoxide v0.4.3-unknown. I installed it yesterday through apt.

I just actually read through the README and realized, that it said not to use apt. I guess I'll use the install script. Thank you!

@esn89
Copy link

esn89 commented Nov 6, 2024

I am getting a similar issue actually. I installed it via macports.

The zoxide init --cmd cd | source does nothing in ~/.config/fish/config.fish.

cd is still pointing to the /usr/bin/cd.

@ajeetdsouza
Copy link
Owner

@esn89 the output of which cd is always /usr/bin/cd because which does not lookup shell functions. If you're having any issue actually using zoxide, please create a fresh issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants