X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=contrib%2Ftg-completion.bash;fp=contrib%2Ftg-completion.bash;h=e34b66f56fb22f50ad6bc1e05524f1a4fe4b4d28;hb=d279e292a787fa733746c3d15209c70e5596ab10;hp=48e47c7047c3c7308cd10b5a0327a63e94cd6fb1;hpb=9b25e8482c536324a6ecdefdf8abc1c0b1dca83e;p=topgit.git diff --git a/contrib/tg-completion.bash b/contrib/tg-completion.bash index 48e47c7..e34b66f 100755 --- a/contrib/tg-completion.bash +++ b/contrib/tg-completion.bash @@ -359,6 +359,14 @@ _tg_mail () local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in + -*) + __tgcomp " + -i + -w + -s + -r + " + ;; *) __tgcomp "$(__tg_topics)" esac @@ -426,7 +434,11 @@ _tg_summary () *) __tgcomp " --graphviz + --sort + --deps -t + -i + -w " esac } @@ -441,6 +453,38 @@ _tg_update () esac } +_tg_next () +{ + local cur="${COMP_WORDS[COMP_CWORD]}" + + case "$cur" in + -*) + __tgcomp " + -i + -w + " + ;; + *) + __tgcomp "$(__tg_heads)" + esac +} + +_tg_prev () +{ + local cur="${COMP_WORDS[COMP_CWORD]}" + + case "$cur" in + -*) + __tgcomp " + -i + -w + " + ;; + *) + __tgcomp "$(__tg_topics)" + esac +} + ### }}} ### {{{ tg completion @@ -488,7 +532,9 @@ _tg () info) _tg_info ;; log) _tg_log ;; mail) _tg_mail ;; + next) _tg_next ;; patch) _tg_patch ;; + prev) _tg_prev ;; push) _tg_push ;; remote) _tg_remote ;; summary) _tg_summary ;;