# filesnarf(8), mailsnarf(8) and msgsnarf (8) completion


comp_include _get_cword


_snarf()
{
	local cur

	COMPREPLY=()
	cur=`_get_cword`
	prev=${COMP_WORDS[COMP_CWORD-1]}

	case "$prev" in
		-i)
			_interfaces
			return 0
			;;
	esac

	if [[ "$cur" == -* ]]; then
		COMPREPLY=( $( compgen -W '-i -v' -- $cur ) )
	fi
} # _snarf()

comp_install -F _snarf  # Make completion persistent for subsequent invocations

_snarf  # Generate completions for first invocation
