Skip to content

Fish: Allow cd aliasing #145

@fennewald

Description

@fennewald

Really cool plugin, just started using it with fish.

Ran into issue trying to alias cd to z, where zoxide tries to call my alias, which calls zoxide, which calls my alias, until stack overflow.

zoxide init fish outputs this internal command (among other things):

function __zoxide_cd
    cd $argv
    and commandline -f repaint
end

However, it should be:

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

In fish, command makes sure to call out instead of calling functions.

I'm not familiar with zoxide's codebase, so I didn't know where to put the fix, otherwise I'd PR myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions