toolsclient option support is back, add docsclient for git-diff
This commit is contained in:
parent
021756dfd4
commit
8d83a5ff9e
|
@ -1,4 +1,5 @@
|
|||
decl line-flag-list git_diff_flags
|
||||
decl str docsclient
|
||||
|
||||
def git-diff-update-buffer %{ %sh{
|
||||
added_lines=""
|
||||
|
@ -59,10 +60,14 @@ def git-blame %{
|
|||
def -shell-params git-show %{ %sh{
|
||||
tmpfile=$(mktemp /tmp/kak-git-show-XXXXXX)
|
||||
if git show "$@" > ${tmpfile}; then
|
||||
[[ -n "$kak_opt_docsclient" ]] && echo "eval -client '$kak_opt_docsclient' %{"
|
||||
|
||||
echo "edit! -scratch *git-show*
|
||||
exec |cat<space>${tmpfile}<ret>gk
|
||||
nop %sh{rm ${tmpfile}}
|
||||
setb filetype diff"
|
||||
|
||||
[[ -n "$kak_opt_docsclient" ]] && echo "}"
|
||||
else
|
||||
echo "echo %{git show '$@' failed, see *debug* buffer}"
|
||||
rm ${tmpfile}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
decl str grepcmd 'grep -RHn'
|
||||
decl str toolsclient
|
||||
|
||||
def -shell-params -file-completion \
|
||||
grep %{ %sh{
|
||||
|
@ -10,13 +11,13 @@ def -shell-params -file-completion \
|
|||
( ${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
|
||||
[[ -n "$kak_opt_toolsclient" ]] && echo "eval -client '$kak_opt_toolsclient' %{"
|
||||
|
||||
echo "edit! -fifo ${output} *grep*
|
||||
setb filetype grep
|
||||
hook buffer BufClose .* %{ nop %sh{ rm -r $(dirname ${output}) } }"
|
||||
|
||||
if [[ -n "$kak_opt_toolsclient" ]]; then echo "}"; fi
|
||||
[[ -n "$kak_opt_toolsclient" ]] && echo "}"
|
||||
}}
|
||||
|
||||
hook global WinSetOption filetype=grep %{
|
||||
|
|
|
@ -1,17 +1,18 @@
|
|||
decl str makecmd make
|
||||
decl str toolsclient
|
||||
|
||||
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
|
||||
[[ -n "$kak_opt_toolsclient" ]] && echo "eval -client '$kak_opt_toolsclient' %{"
|
||||
|
||||
echo "edit! -fifo ${output} *make*
|
||||
setb filetype make
|
||||
hook buffer BufClose .* %{ nop %sh{ rm -r $(dirname ${output}) } }"
|
||||
|
||||
if [[ -n "$kak_opt_toolsclient" ]]; then echo "}"; fi
|
||||
[[ -n "$kak_opt_toolsclient" ]] && echo "}"
|
||||
}}
|
||||
|
||||
hook global WinSetOption filetype=make %{
|
||||
|
|
Loading…
Reference in New Issue
Block a user