# bash completion for dhcpoptinj _dhcpoptinj() { local cur prev words cword split _init_completion -s || return case $prev in -h|--help|-v|--version) return ;; -c|--conf-file) _filedir 'conf' return ;; esac if [[ "$cur" == -* ]]; then # _parse_help returns a slightly inconsistent mix of short and long # options since some options are mentioned several times in the help # text. We can forgive this. Rather use this help function than having # to implement the extra code: COMPREPLY=( $(compgen -W '$(_parse_help "$1")' -- "$cur") ) [[ $COMPREPLY == *= ]] && compopt -o nospace return 0 fi } && complete -F _dhcpoptinj dhcpoptinj # ex: ts=4 sw=4 filetype=sh expandtab