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=52c8d3cd567f12930c1860298baa97a6312e9c56;hp=ddc7655fde13bacd68cc4191a0414839de0c620c;hpb=f281705dd58f0bfa29ccad928b8ee8d7331ae526;p=topgit.git diff --git a/contrib/tg-completion.bash b/contrib/tg-completion.bash index ddc7655..e34b66f 100755 --- a/contrib/tg-completion.bash +++ b/contrib/tg-completion.bash @@ -453,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 @@ -500,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 ;;