mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-23 23:34:12 +03:00
git-tools.kak: initial git-show command
This commit is contained in:
parent
1b5760f1a1
commit
e68f3cfe35
@ -55,3 +55,16 @@ def git-blame %{
|
||||
done; send_flags )
|
||||
) >& /dev/null < /dev/null & }
|
||||
}
|
||||
|
||||
def -shell-params git-show %{ %sh{
|
||||
tmpfile=$(mktemp /tmp/kak-git-show-XXXXXX)
|
||||
if git show "$@" > ${tmpfile}; then
|
||||
echo "edit! -scratch *git-show*
|
||||
exec |cat<space>${tmpfile}<ret>gk
|
||||
nop %sh{rm ${tmpfile}}
|
||||
setb filetype diff"
|
||||
else
|
||||
echo "echo %{git show '$@' failed, see *debug* buffer}"
|
||||
rm ${tmpfile}
|
||||
fi
|
||||
}}
|
||||
|
Loading…
Reference in New Issue
Block a user