dotfiles/fish/.config/fish/functions/vgF.fish

5 lines
356 B
Fish

function vgF --wraps=vgrep --description 'vgrep search with fzf'
set -f INITIAL_QUERY $argv[1]
FZF_DEFAULT_COMMAND="vgrep --no-header $INITIAL_QUERY" fzf --bind "Ctrl-d:half-page-down,Ctrl-u:half-page-up,change:reload:vgrep --no-header {q} || true" --ansi --phony --tac --query $INITIAL_QUERY | awk '{print $1}' | xargs -I{} -o vgrep --show {}
end