chiark / gitweb /
Merge branch 'i/build' into refs/top-bases/i/basis-merge
[topgit.git] / contrib / tg-completion.bash
index ddc7655fde13bacd68cc4191a0414839de0c620c..e34b66f56fb22f50ad6bc1e05524f1a4fe4b4d28 100755 (executable)
@@ -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 ;;