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