18 lines
656 B
Text
18 lines
656 B
Text
declare-user-mode git
|
|
map -docstring "git" global user g ": enter-user-mode git<ret>"
|
|
map -docstring "lazygit kak cwd" global git g ": terminal lazygit<ret>"
|
|
|
|
define-command lazygit-buffer-dir %{
|
|
evaluate-commands %sh{
|
|
ROOT="$(env -C "$(dirname $kak_buffile)" git rev-parse --show-toplevel)"
|
|
printf "terminal lazygit -p %s" "$ROOT"
|
|
}
|
|
}
|
|
map -docstring "lazygit buffer directory" global git G ": lazygit-buffer-dir<ret>"
|
|
|
|
define-command git-blame %{
|
|
info %sh{
|
|
git -C $(dirname $(realpath $kak_buffile)) blame -L $kak_cursor_line,$kak_cursor_line $(realpath $kak_buffile)
|
|
}
|
|
}
|
|
map -docstring "blame" global git b ": git-blame<ret>"
|