36 lines
738 B
Plaintext
Raw Normal View History

# bash completion for ntpdate -*- shell-script -*-
2009-05-17 21:53:51 +02:00
_ntpdate()
{
local cur prev words cword
_init_completion || return
2009-05-17 21:53:51 +02:00
2009-10-04 19:42:50 +02:00
case $prev in
-k)
_filedir
return 0
;;
-U)
COMPREPLY=( $( compgen -u "$cur" ) )
return 0
;;
-p)
COMPREPLY=( $( compgen -W '{1..8}' -- "$cur" ) )
return 0
;;
2012-07-22 19:35:03 +03:00
-a|-e|-o|-t)
2009-10-04 19:42:50 +02:00
return 0
;;
esac
2009-05-17 21:53:51 +02:00
2009-10-04 19:42:50 +02:00
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_usage "$1" )' -- "$cur" ) )
2009-10-04 19:42:50 +02:00
else
_known_hosts_real "$cur"
fi
2009-05-17 21:53:51 +02:00
} &&
complete -F _ntpdate ntpdate
2009-10-04 19:42:50 +02:00
# ex: ts=4 sw=4 et filetype=sh