# hostname(1) completion -*- shell-script -*- proc _hostname { local cur prev words cword _init_completion || return case (prev) { -h|--help|-V|--version { return } -F|--file { _filedir return } } [[ $cur == -* ]] && \ setvar COMPREPLY = ''( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) ) } && complete -F _hostname hostname # ex: ts=4 sw=4 et filetype=sh