Skip to content

Support exact match of last component #558

Open
@markcho

Description

@markcho

I've been a long time user of autojump but recently made the switch to zoxide.

One pain point I have right now is that I can't specify an exact match of the last component.

For example, I have the following directories:

~/somedir/foo
~/somedir/foo-bar
~/somedir/foo-baz
...

Where foo is a prefix to a lot of other dirs.

In autojump, I increased the weight of ~/somedir/foo so that j foo always resolve to this dir. But with zoxide, when calling z foo, the frecency algorithm will prefer other foo- dir if I've visited that more recently.

Would it be possible to support exact match of last component if / is specified like z foo/? Currently, this is used to cd foo/ if foo/ exists, otherwise it matches some other dir like ~/somedir/foo/subdir. It would be useful to have z foo/ match the last component exactly if cd foo/ is not a match.

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