X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=contrib%2Ftg-completion.bash;h=e34b66f56fb22f50ad6bc1e05524f1a4fe4b4d28;hb=refs%2Ftop-bases%2Ffixes%2Fexport--b-deps;hp=ccf1a32751b0316c7ba193f7bd6cf3815cf96a5c;hpb=ff59ac7fce3326e0b0163a780ecb49dd3b1de8d1;p=topgit.git diff --git a/contrib/tg-completion.bash b/contrib/tg-completion.bash index ccf1a32..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 @@ -482,12 +526,15 @@ _tg () delete) _tg_delete ;; depend) _tg_depend ;; export) _tg_export ;; + files) _tg_patch ;; help) _tg_help ;; import) _tg_import ;; 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 ;;