v
v copied to clipboard
You can now use v with fzf
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
}