From f422b8c725103824e4b431464020ae035aa99555 Mon Sep 17 00:00:00 2001 From: Justin Frank Date: Sun, 16 Sep 2018 00:30:46 -0700 Subject: [PATCH 1/2] added `git hide-diff` convenience command --- rc/extra/git-tools.kak | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rc/extra/git-tools.kak b/rc/extra/git-tools.kak index bd773b46..7b06f39b 100644 --- a/rc/extra/git-tools.kak +++ b/rc/extra/git-tools.kak @@ -26,10 +26,10 @@ set-face global GitDiffFlags default,black define-command -params 1.. \ -docstring %sh{printf 'git []: git wrapping helper All the optional arguments are forwarded to the git utility -Available commands:\n add\n rm\n blame\n commit\n checkout\n diff\n hide-blame\n log\n show\n show-diff\n status\n update-diff'} \ +Available commands:\n add\n rm\n blame\n commit\n checkout\n diff\n hide-blame\n log\n show\n show-diff\n status\n update-diff\n hide-diff'} \ -shell-candidates %{ if [ $kak_token_to_complete -eq 0 ]; then - printf "add\nrm\nblame\ncommit\ncheckout\ndiff\nhide-blame\nlog\nshow\nshow-diff\nstatus\nupdate-diff\n" + printf "add\nrm\nblame\ncommit\ncheckout\ndiff\nhide-blame\nlog\nshow\nshow-diff\nstatus\nupdate-diff\nhide-diff\n" else case "$1" in commit) printf -- "--amend\n--no-edit\n--all\n--reset-author\n--fixup\n--squash\n"; git ls-files -m ;; @@ -185,6 +185,9 @@ Available commands:\n add\n rm\n blame\n commit\n checkout\n diff\n hide- echo 'try %{ add-highlighter window/git-diff flag-lines GitDiffFlags git_diff_flags }' update_diff ;; + hide-diff) + echo 'try %{ remove-highlighter window/git-diff }' + ;; update-diff) update_diff ;; commit) shift; commit "$@" ;; checkout) From 2c753889ca0308e1d366b6c0278e8f534a2d8b8b Mon Sep 17 00:00:00 2001 From: Justin Frank Date: Sun, 16 Sep 2018 13:52:17 -0700 Subject: [PATCH 2/2] changed order of git hide-diff in menus --- rc/extra/git-tools.kak | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rc/extra/git-tools.kak b/rc/extra/git-tools.kak index 7b06f39b..82d62f78 100644 --- a/rc/extra/git-tools.kak +++ b/rc/extra/git-tools.kak @@ -26,10 +26,10 @@ set-face global GitDiffFlags default,black define-command -params 1.. \ -docstring %sh{printf 'git []: git wrapping helper All the optional arguments are forwarded to the git utility -Available commands:\n add\n rm\n blame\n commit\n checkout\n diff\n hide-blame\n log\n show\n show-diff\n status\n update-diff\n hide-diff'} \ +Available commands:\n add\n rm\n blame\n commit\n checkout\n diff\n hide-blame\n hide-diff\n log\n show\n show-diff\n status\n update-diff'} \ -shell-candidates %{ if [ $kak_token_to_complete -eq 0 ]; then - printf "add\nrm\nblame\ncommit\ncheckout\ndiff\nhide-blame\nlog\nshow\nshow-diff\nstatus\nupdate-diff\nhide-diff\n" + printf "add\nrm\nblame\ncommit\ncheckout\ndiff\nhide-blame\nhide-diff\nlog\nshow\nshow-diff\nstatus\nupdate-diff\n" else case "$1" in commit) printf -- "--amend\n--no-edit\n--all\n--reset-author\n--fixup\n--squash\n"; git ls-files -m ;;