rc/{grep,make}.kak: use a scratch buffer to store results
This commit is contained in:
parent
78b0c2f7f5
commit
e7153aacef
|
@ -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}<ret>gg}
|
||||
%sh{rm ${output} }"
|
||||
}}
|
||||
|
||||
hook global WinSetOption filetype=grep %{
|
||||
|
|
|
@ -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}<ret>gg}
|
||||
%sh{ rm ${output} }"
|
||||
}}
|
||||
|
||||
hook global WinSetOption filetype=make %{
|
||||
|
|
Loading…
Reference in New Issue
Block a user