X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=topgit.git;a=blobdiff_plain;f=contrib%2Ftg-completion.bash;fp=contrib%2Ftg-completion.bash;h=e34b66f56fb22f50ad6bc1e05524f1a4fe4b4d28;hp=0ee233c4781b1fe8d3a84772c59373e30ed2f06f;hb=2ebd7e46e3a42a1a990bbcbe074aec508ae0fbc3;hpb=7c445490c8d9d535f559e9bbc105425e01b0785d diff --git a/contrib/tg-completion.bash b/contrib/tg-completion.bash index 0ee233c..e34b66f 100755 --- a/contrib/tg-completion.bash +++ b/contrib/tg-completion.bash @@ -344,11 +344,29 @@ _tg_info () esac } +_tg_log () +{ + local cur="${COMP_WORDS[COMP_CWORD]}" + + case "$cur" in + *) + __tgcomp "$(__tg_topics)" + esac +} + _tg_mail () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in + -*) + __tgcomp " + -i + -w + -s + -r + " + ;; *) __tgcomp "$(__tg_topics)" esac @@ -416,14 +434,55 @@ _tg_summary () *) __tgcomp " --graphviz + --sort + --deps -t + -i + -w " esac } _tg_update () { - COMPREPLY=() + local cur="${COMP_WORDS[COMP_CWORD]}" + + case "$cur" in + *) + __tgcomp "$(__tg_topics)" + 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 } ### }}} @@ -467,11 +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 ;;