Skip to content
This repository has been archived by the owner on Feb 17, 2018. It is now read-only.

Commit

Permalink
tg-push: add bash completion
Browse files Browse the repository at this point in the history
Include all options.

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
  • Loading branch information
bertwesarg authored and ukleinek committed Jun 4, 2009
1 parent 81b2ec8 commit c170d19
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions contrib/tg-completion.bash
Expand Up @@ -370,6 +370,29 @@ _tg_patch ()
esac
}

_tg_push ()
{
local cur="${COMP_WORDS[COMP_CWORD]}"

__tg_complete_arg "-r" && {
__tgcomp "$(__tg_remotes)"
return
}

case "$cur" in
-*)
__tgcomp "
--no-deps
--dry-run
--tgish-only
-r
"
;;
*)
__tgcomp "$(__tg_topics)"
esac
}

_tg_remote ()
{
local cur="${COMP_WORDS[COMP_CWORD]}"
Expand Down Expand Up @@ -449,6 +472,7 @@ _tg ()
info) _tg_info ;;
mail) _tg_mail ;;
patch) _tg_patch ;;
push) _tg_push ;;
remote) _tg_remote ;;
summary) _tg_summary ;;
update) _tg_update ;;
Expand Down

0 comments on commit c170d19

Please sign in to comment.