# bash completion for ntpdate -*- shell-script -*- proc _ntpdate { local cur prev words cword _init_completion || return match $prev { with -k _filedir return 0 with -U setglobal COMPREPLY = ''( $( compgen -u -- "$cur" ) ) return 0 with -p setglobal COMPREPLY = ''( $( compgen -W '{1..8}' -- "$cur" ) ) return 0 with -a|-e|-o|-t return 0 } if [[ "$cur" == -* ]] { setglobal COMPREPLY = ''( $( compgen -W '$( _parse_usage "$1" )' -- "$cur" ) ) } else { _known_hosts_real $cur } } && complete -F _ntpdate ntpdate # ex: ts=4 sw=4 et filetype=sh