fish: functions: Add fzf versions of vgrep
This commit is contained in:
parent
d4f81fe865
commit
8aeabd9473
2 changed files with 8 additions and 0 deletions
4
fish/.config/fish/functions/vgF.fish
Normal file
4
fish/.config/fish/functions/vgF.fish
Normal 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
|
4
fish/.config/fish/functions/vgf.fish
Normal file
4
fish/.config/fish/functions/vgf.fish
Normal 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
|
Loading…
Reference in a new issue