Skip to content

You can now use v with fzf #23

@pkrumins

Description

@pkrumins

I made v work with fzf. First, modify v not to display the choice dialog when using the -l flag, then use this shell function to call it:

v() {
    if [[ -z "$@" ]]; then
        local -r choice="$(command v -l 2>&1 | fzf +s --tac --height 15 --reverse | sed -r 's/^[0-9,. \t]*//')"
        if [[ ! -z "$choice" ]]; then
            local -r file="${choice/#~/$HOME}"
            vim "$file"
        fi
    else
        command v "$@"
    fi
}

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