diff --git a/src/rc/grep.kak b/src/rc/grep.kak index 997f1ff0..0bd72d52 100644 --- a/src/rc/grep.kak +++ b/src/rc/grep.kak @@ -9,10 +9,15 @@ def -shell-params -file-completion \ else ( ${kak_opt_grepcmd} "${kak_selection}" | tr -d '\r' >& ${output} ) >& /dev/null < /dev/null & fi + + if [[ -n "$kak_opt_toolsclient" ]]; then echo "eval -client '$kak_opt_toolsclient' %{"; fi + echo "try %{ db *grep* } catch %{} edit -fifo ${output} *grep* setb filetype grep hook buffer BufClose .* %{ nop %sh{ rm -r $(dirname ${output}) } }" + + if [[ -n "$kak_opt_toolsclient" ]]; then echo "}"; fi }} hook global WinSetOption filetype=grep %{ diff --git a/src/rc/make.kak b/src/rc/make.kak index 2c3d4aa5..73a4a293 100644 --- a/src/rc/make.kak +++ b/src/rc/make.kak @@ -4,10 +4,15 @@ def -shell-params make %{ %sh{ output=$(mktemp -d -t kak-make.XXXXXXXX)/fifo mkfifo ${output} ( ${kak_opt_makecmd} $@ >& ${output} ) >& /dev/null < /dev/null & + + if [[ -n "$kak_opt_toolsclient" ]]; then echo "eval -client '$kak_opt_toolsclient' %{"; fi + echo "try %{ db *make* } catch %{} edit -fifo ${output} *make* setb filetype make hook buffer BufClose .* %{ nop %sh{ rm -r $(dirname ${output}) } }" + + if [[ -n "$kak_opt_toolsclient" ]]; then echo "}"; fi }} hook global WinSetOption filetype=make %{