+function _network_route() {
+ local words=( $@ )
+
+ local commands="add list remove"
+ local cmd="$(_network_find_on_cmdline "${commands}")"
+ if [[ -z "${cmd}" ]]; then
+ COMPREPLY=( $(compgen -W "${commands}" -- "${cur}") )
+ return 0
+ fi
+
+ case "${cmd}" in
+ add)
+ if [[ "${cur}" = -* ]]; then
+ COMPREPLY=( $(compgen -W "--blackhole --gateway= --mtu= \
+ --prohibit --unreachable" -- "${cur}") )
+ fi
+ ;;
+ list)
+ # TODO auto-complete options like --protocol here
+ COMPREPLY=( $(compgen -W "--protocol=" -- "${cur}") )
+ ;;
+ esac
+}
+