From 84ee2b382f246000a3a6115f7d7c20aecfcc3230 Mon Sep 17 00:00:00 2001 From: nonumeros Date: Sat, 20 Apr 2019 04:30:33 -0400 Subject: [PATCH] adding init to git.kak, removed candidates adding init to git.kak removing git init EOF line git ls-files on on git.kak no candidates for git-init, removed function removed candidates for git-init --- rc/tools/git.kak | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rc/tools/git.kak b/rc/tools/git.kak index 21b5627b..3398dd2d 100644 --- a/rc/tools/git.kak +++ b/rc/tools/git.kak @@ -25,10 +25,10 @@ declare-option -hidden line-specs git_diff_flags 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 hide-diff\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 \init\n log\n show\n show-diff\n status\n update-diff'} \ -shell-script-candidates %{ if [ $kak_token_to_complete -eq 0 ]; then - printf "add\nrm\nblame\ncommit\ncheckout\ndiff\nhide-blame\nhide-diff\nlog\nshow\nshow-diff\nstatus\nupdate-diff\n" + printf "add\nrm\nblame\ncommit\ncheckout\ndiff\nhide-blame\nhide-diff\nlog\nshow\nshow-diff\ninit\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 ;; @@ -145,6 +145,7 @@ Available commands:\n add\n rm\n blame\n commit\n checkout\n diff\n hide- ' } + commit() { # Handle case where message needs not to be edited if grep -E -q -e "-m|-F|-C|--message=.*|--file=.*|--reuse-message=.*|--no-edit|--fixup.*|--squash.*"; then @@ -189,6 +190,7 @@ Available commands:\n add\n rm\n blame\n commit\n checkout\n diff\n hide- ;; update-diff) update_diff ;; commit) shift; commit "$@" ;; + init) shift; git init "$@" > /dev/null 2>&1 ;; checkout) name="${2:-${kak_buffile}}" git checkout "${name}" > /dev/null 2>&1