ntpdate: Use _parse_usage, add some option argument (non)completions.
This commit is contained in:
parent
c2bee3b831
commit
cfdfa76ffb
@ -13,14 +13,21 @@ _ntpdate()
|
||||
return 0
|
||||
;;
|
||||
-U)
|
||||
COMPREPLY=( $( compgen -u "$cur" ) )
|
||||
COMPREPLY=( $( compgen -u "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
-p)
|
||||
COMPREPLY=( $( compgen -W '{1..8}' -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
|
||||
-a|-e|-o|-t)
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ "$cur" == -* ]]; then
|
||||
COMPREPLY=( $( compgen -W '-4 -6 -b -B -d -Q -q -s -u -v -a\
|
||||
-e -k -p -o -r -t' -- "$cur" ) )
|
||||
COMPREPLY=( $( compgen -W '$( _parse_usage "$1" )' -- "$cur" ) )
|
||||
else
|
||||
_known_hosts_real "$cur"
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user