fish: functions: Add fzf versions of vgrep

This commit is contained in:
Sanchayan Maity 2022-05-19 09:39:28 +05:30
parent d4f81fe865
commit 8aeabd9473
2 changed files with 8 additions and 0 deletions

View file

@ -0,0 +1,4 @@
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

View file

@ -0,0 +1,4 @@
function vgf --wraps=vgrep --description 'vgrep search with fzf'
set -f INITIAL_QUERY $argv[1]
vgrep --no-header $INITIAL_QUERY | fzf --ansi --bind "Ctrl-d:half-page-down,Ctrl-u:half-page-up" | awk '{print $1}' | xargs -I{} -o vgrep --show {}
end