1 2 3 4 5 6 7 8 9 10 11 12
_i2prouter() { local cur prev opts _init_completion || return COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" opts="console start stop graceful restart dump" COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) } complete -F _i2prouter i2prouter