grep,make: support specifying client with toolsclient option
When toolsclient option is set, make and grep opens their buffer in the specified client instead of the current one.
This commit is contained in:
parent
901d5ea1be
commit
efc0a8bc07
|
@ -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 %{
|
||||
|
|
|
@ -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 %{
|
||||
|
|
Loading…
Reference in New Issue
Block a user