chiark / gitweb /
tg-completion: complete options for `tg remote`
[topgit.git] / contrib / tg-completion.bash
index 59fbc5065475bdb0241e73945f022196c9a0fc4f..9641d04dea15bbf019fe492417b1aa617b26abe7 100755 (executable)
@@ -191,7 +191,7 @@ __tg_complete_revlist ()
 
 __tg_topics ()
 {
-       tg summary | cut -f 2
+       tg summary -t
 }
 
 __tg_commands ()
@@ -369,6 +369,11 @@ _tg_remote ()
        local cur="${COMP_WORDS[COMP_CWORD]}"
 
        case "$cur" in
+       -*)
+               __tgcomp "
+                       --populate
+               "
+               ;;
        *)
                __tgcomp "$(__tg_remotes)"
        esac
@@ -376,7 +381,15 @@ _tg_remote ()
 
 _tg_summary ()
 {
-       COMPREPLY=()
+       local cur="${COMP_WORDS[COMP_CWORD]}"
+
+       case "$cur" in
+       *)
+               __tgcomp "
+                       --graphviz
+                       -t
+               "
+       esac
 }
 
 _tg_update ()