Skip to content

Relative paths involving symlinks not detected as directories #1166

@br0ns

Description

@br0ns

This concerns at least zsh, I haven't tried other shells.

Steps to reproduce:

mkdir -p foo/bar
ln -s foo/bar baz
cd baz
cd ../foo

The last command fails with zoxide: no match found.

The problem lies the second if-statement in templates/zsh.txt which uses test -d to check if ../foo is a directory, which dereferences symlinks before expanding ... Therefore ../foo is determined to not be a directory and Zoxide is queried instead of calling the builtin cd. Note that cd works as expected in this scenario.

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