# Gentoo Linux Repoman Command Completion
#
# $Id: repoman 83 2009-05-05 03:31:30Z darkside $
#
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later

# repoman completion by Jeremy Olexa <darkside@gentoo.org>

_repoman()
{
	local cur

	COMPREPLY=()
	cur=`_get_cword`

	case "$cur" in
		-*)
		COMPREPLY=( $( compgen -W '-h --help -m -M -p --pretend -q --quiet -f \
		--force -v --verbose -V --version -x --xmlparse -i --ignore-arches -I \
		--ignore-masked -d --include-dev --without-mask --mode=' -- $cur ) )
		;;
		*)
		if [ $COMP_CWORD -eq 1 ]; then
			COMPREPLY=( $( compgen -W 'ci commit fix full help manifest scan' \
			-- $cur ) )
		fi
		;;
	esac

	return 0

}
complete -F _repoman -o filenames repoman
