Merge remote-tracking branch 'laelath/git-hide-diff'

This commit is contained in:
Maxime Coste 2018-09-18 22:30:50 +10:00
commit 7956e893be

View File

@ -26,10 +26,10 @@ set-face global GitDiffFlags default,black
define-command -params 1.. \ define-command -params 1.. \
-docstring %sh{printf 'git [<arguments>]: git wrapping helper -docstring %sh{printf 'git [<arguments>]: git wrapping helper
All the optional arguments are forwarded to the git utility 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 hide-diff\n log\n show\n show-diff\n status\n update-diff'} \
-shell-candidates %{ -shell-candidates %{
if [ $kak_token_to_complete -eq 0 ]; then 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\nhide-diff\nlog\nshow\nshow-diff\nstatus\nupdate-diff\n"
else else
case "$1" in case "$1" in
commit) printf -- "--amend\n--no-edit\n--all\n--reset-author\n--fixup\n--squash\n"; git ls-files -m ;; 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 }' echo 'try %{ add-highlighter window/git-diff flag-lines GitDiffFlags git_diff_flags }'
update_diff update_diff
;; ;;
hide-diff)
echo 'try %{ remove-highlighter window/git-diff }'
;;
update-diff) update_diff ;; update-diff) update_diff ;;
commit) shift; commit "$@" ;; commit) shift; commit "$@" ;;
checkout) checkout)