diff --git a/src/rc/grep.kak b/src/rc/grep.kak index ecb45e0a..eaa270c9 100644 --- a/src/rc/grep.kak +++ b/src/rc/grep.kak @@ -1,7 +1,12 @@ def -env-params grep %{ echo grep in progress, please wait...; %sh{ output=$(mktemp -t kak-grep.XXXXXXXX) grep -Hn $kak_param0 $kak_param1 $kak_param2 $kak_param3 $kak_param4 >& ${output} - echo "echo; edit ${output}; setb filetype grep; hook buffer BufClose ${output} %{ %sh{rm ${output} } }" + echo "echo + try %{ db *grep* } catch %{ } + edit -scratch *grep* + setb filetype grep + exec %{|cat ${output}gg} + %sh{rm ${output} }" }} hook global WinSetOption filetype=grep %{ diff --git a/src/rc/make.kak b/src/rc/make.kak index d6b0ad90..b3f3751f 100644 --- a/src/rc/make.kak +++ b/src/rc/make.kak @@ -1,7 +1,12 @@ def -env-params make %{ echo make in progress, please wait...; %sh{ output=$(mktemp -t kak-make.XXXXXXXX) make ${kak_param_0} ${kak_param_1} ${kak_param_2} ${kak_param_3} ${kak_param_4} >& ${output} - echo "echo; edit ${output}; setb filetype make; hook buffer BufClose ${output} %{ %sh{rm ${output} } }" + echo "echo + try %{ db *make* } catch %{ } + edit -scratch %{*make*} + setb filetype make + exec %{|cat ${output}gg} + %sh{ rm ${output} }" }} hook global WinSetOption filetype=make %{