X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=contrib%2Ftg-completion.bash;h=5aabc922733c1f18b149581f6e60310802e615af;hb=8d92943bcdb6eea3819dce28d2ff48dd8a061b31;hp=67f820e8d55068697490ac537f27cede4ba46fd2;hpb=603df20f16bcd4c11365bfad1fb7f5b3c7228c07;p=topgit.git diff --git a/contrib/tg-completion.bash b/contrib/tg-completion.bash index 67f820e..5aabc92 100755 --- a/contrib/tg-completion.bash +++ b/contrib/tg-completion.bash @@ -359,6 +359,35 @@ _tg_patch () local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in + -*) + __tgcomp " + -i + -w + " + ;; + *) + __tgcomp "$(__tg_topics)" + esac +} + +_tg_push () +{ + local cur="${COMP_WORDS[COMP_CWORD]}" + + __tg_complete_arg "-r" && { + __tgcomp "$(__tg_remotes)" + return + } + + case "$cur" in + -*) + __tgcomp " + --no-deps + --dry-run + --tgish-only + -r + " + ;; *) __tgcomp "$(__tg_topics)" esac @@ -369,6 +398,11 @@ _tg_remote () local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in + -*) + __tgcomp " + --populate + " + ;; *) __tgcomp "$(__tg_remotes)" esac @@ -376,12 +410,25 @@ _tg_remote () _tg_summary () { - COMPREPLY=() + local cur="${COMP_WORDS[COMP_CWORD]}" + + case "$cur" in + *) + __tgcomp " + --graphviz + -t + " + esac } _tg_update () { - COMPREPLY=() + local cur="${COMP_WORDS[COMP_CWORD]}" + + case "$cur" in + *) + __tgcomp "$(__tg_topics)" + esac } ### }}} @@ -430,6 +477,7 @@ _tg () info) _tg_info ;; mail) _tg_mail ;; patch) _tg_patch ;; + push) _tg_push ;; remote) _tg_remote ;; summary) _tg_summary ;; update) _tg_update ;;