X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=contrib%2Ftg-completion.bash;h=0ee233c4781b1fe8d3a84772c59373e30ed2f06f;hb=1b32026fa9eef956f091752230bd4a9806ffa1a9;hp=4d69c05e26951307a38070bbd0315af60833dbf5;hpb=3aec3f8eece2f1f2b6d1df66ce48b060733ff6f8;p=topgit.git diff --git a/contrib/tg-completion.bash b/contrib/tg-completion.bash index 4d69c05..0ee233c 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 @@ -438,6 +472,7 @@ _tg () info) _tg_info ;; mail) _tg_mail ;; patch) _tg_patch ;; + push) _tg_push ;; remote) _tg_remote ;; summary) _tg_summary ;; update) _tg_update ;;