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

Cd to previous directory z - is broken in fish #178

Closed
comfortablynick opened this issue Apr 12, 2021 · 1 comment · Fixed by #179
Closed

Cd to previous directory z - is broken in fish #178

comfortablynick opened this issue Apr 12, 2021 · 1 comment · Fixed by #179

Comments

@comfortablynick
Copy link

After 7b00d5a, the command z - no longer works. I think this is because the logic for the directory stack is in a fish function.

$ z -
cd: The directory “-” does not exist

$ builtin cd -
cd: The directory “-” does not exist

To test, I redefined __zoxide_cd:

function __zoxide_cd
      cd $argv; and commandline -f repaint
end

(Using builtin commandline is probably unnecessary since the authors of fish shell only use commandline.)

@ajeetdsouza
Copy link
Owner

Hey @comfortablynick, thanks for reporting this issue!

I had changed it to builtin cd to make something like this possible:

function cd
    z $argv
end

Using builtin everywhere reduces ambiguity, and would have allowed fish users to do something like this. Unfortunately, the fact that fish already includes wraps their own cd builtin complicates this.

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

Successfully merging a pull request may close this issue.

2 participants