38 lines
705 B
Plaintext
Raw Normal View History

2009-05-17 21:53:51 +02:00
# bash completion for ntpdate
have ntpdate &&
_ntpdate()
{
2009-10-04 19:42:50 +02:00
local cur prev
2009-05-17 21:53:51 +02:00
2009-10-04 19:42:50 +02:00
COMPREPLY=()
_get_comp_words_by_ref cur prev
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
;;
esac
2009-05-17 21:53:51 +02:00
2009-10-04 19:42:50 +02:00
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-4 -6 -b -B -d -Q -q -s -u -v -a\
-e -k -p -o -r -t' -- "$cur" ) )
else
_known_hosts_real "$cur"
fi
2009-05-17 21:53:51 +02:00
} &&
complete -F _ntpdate ntpdate
# Local variables:
# mode: shell-script
2009-10-04 19:42:50 +02:00
# sh-basic-offset: 4
# sh-indent-comment: t
2009-10-04 19:42:50 +02:00
# indent-tabs-mode: nil
# End:
2009-10-04 19:42:50 +02:00
# ex: ts=4 sw=4 et filetype=sh