diff --git a/src/rc/grep.kak b/src/rc/grep.kak index bf5ebe5f..51e9fbd7 100644 --- a/src/rc/grep.kak +++ b/src/rc/grep.kak @@ -1,12 +1,11 @@ def -env-params grep %{ echo grep in progress, please wait...; %sh{ output=$(mktemp -t kak-grep.XXXXXXXX) - grep -PHn $kak_param0 $kak_param1 $kak_param2 $kak_param3 $kak_param4 >& ${output} + grep -PHn $kak_param0 $kak_param1 $kak_param2 $kak_param3 $kak_param4 >& ${output} < /dev/null & echo "echo try %{ db *grep* } catch %{ } - edit -scratch *grep* + edit -fifo ${output} *grep* setb filetype grep - exec %{|cat ${output}gg} - %sh{ rm ${output} }" + hook buffer BufClose .* %{ %sh{ rm ${output} } }" }} hook global WinSetOption filetype=grep %{ diff --git a/src/rc/make.kak b/src/rc/make.kak index 85018539..e4e6e53b 100644 --- a/src/rc/make.kak +++ b/src/rc/make.kak @@ -1,12 +1,11 @@ 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} + make $kak_param_0 $kak_param_1 $kak_param_2 $kak_param_3 $kak_param_4 >& ${output} < /dev/null & echo "echo try %{ db *make* } catch %{ } - edit -scratch %{*make*} + edit -fifo ${output} *make* setb filetype make - exec %{|cat ${output}gg} - %sh{ rm ${output} }" + hook buffer BufClose .* %{ %sh{ rm ${output} } }" }} hook global WinSetOption filetype=make %{