Skip to content

[Feature Request] Option to direct cd bookmark in case of exact match #53

@erikw

Description

@erikw

Hey,

first thank you for this cool plugin!

As I just started to use it I already noticed a part of my workflow from a previous shell plugin manager that did not translate well to fzf-marks for me. If I type $ fzm abc and there are many bookmarks who's bookmark name matches abc, it's completely reasonable to open up the FZF selector window (current behaviour).

However in the case it's already an exact match of a bookmark, that is I have a bookmark with name abc, I would expect that I directly cd to that bookmark instead of showing suggestions for other partial matches.

This is important to be able to work fast in the shell. If I know that I want to go to bookmark abc, then $ fzm abc should be enough to take me there. Currently the window will pop up on a exact name match and I need to press enter to go there.

As this is maybe not the behaviour that everyone desires, I would propose that we introduce a new opt-in configuration option:

Config Default Description
FZF_MARKS_JUMP_EXACT_MATCH false With fzm, cd to bookmark directly if the optional-initial-query is an exact match for a bookmark

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