case directly to $kak_opt_grepcmd
This commit is contained in:
parent
d8b9b13d07
commit
cac2167540
|
@ -10,15 +10,11 @@ define-command -params .. -docstring %{
|
||||||
Passing no argument will perform a literal-string grep for the current selection
|
Passing no argument will perform a literal-string grep for the current selection
|
||||||
} grep %{ evaluate-commands %sh{
|
} grep %{ evaluate-commands %sh{
|
||||||
if [ $# -eq 0 ]; then
|
if [ $# -eq 0 ]; then
|
||||||
IFS=" " greptool=$(
|
case "$kak_opt_grepcmd" in
|
||||||
set -- $kak_opt_grepcmd
|
ag\ * | git\ grep\ * | grep\ * | rg\ * | ripgrep\ * | ugrep\ * | ug\ *)
|
||||||
echo "$1"
|
|
||||||
)
|
|
||||||
case "$greptool" in
|
|
||||||
ag | grep | rg | ripgrep | ugrep | ug)
|
|
||||||
set -- -F "${kak_selection}"
|
set -- -F "${kak_selection}"
|
||||||
;;
|
;;
|
||||||
ack )
|
ack\ *)
|
||||||
set -- -Q "${kak_selection}"
|
set -- -Q "${kak_selection}"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user