From c6ee9b3c11f6d4bee570159247e69461ab7050d4 Mon Sep 17 00:00:00 2001 From: Joshua Trees Date: Wed, 27 Jan 2021 20:39:40 +0100 Subject: [PATCH] Support colors with interactive sk grep This can be combined with something like this to get color highlighting of matches: ``` set-option global fzf_sk_grep_command 'rg --color=always' ``` --- rc/modules/sk-grep.kak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc/modules/sk-grep.kak b/rc/modules/sk-grep.kak index 07b8bd0..ee21975 100644 --- a/rc/modules/sk-grep.kak +++ b/rc/modules/sk-grep.kak @@ -40,7 +40,7 @@ $kak_opt_fzf_vertical_map: open search result in vertical split" printf "%s\n" "info -title '${title}' '${message}${tmux_keybindings}'" [ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect $kak_opt_fzf_vertical_map --expect $kak_opt_fzf_horizontal_map" - printf "%s\n" "fzf -kak-cmd %{fzf-sk-grep-handler} -fzf-impl %{sk -m -i -c '$kak_opt_fzf_sk_grep_command {}'} -fzf-args %{--expect $kak_opt_fzf_window_map $additional_flags} -multiple-cmd %{fzf-sk-populate-grep} -post-action %{buffer %opt{fzf_sk_first_file}}" + printf "%s\n" "fzf -kak-cmd %{fzf-sk-grep-handler} -fzf-impl %{sk --ansi -m -i -c '$kak_opt_fzf_sk_grep_command {}'} -fzf-args %{--expect $kak_opt_fzf_window_map $additional_flags} -multiple-cmd %{fzf-sk-populate-grep} -post-action %{buffer %opt{fzf_sk_first_file}}" }} define-command -hidden fzf-sk-grep-handler -params 1 %{