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
|
return 0
|
||||||
;;
|
;;
|
||||||
-U)
|
-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
|
return 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '-4 -6 -b -B -d -Q -q -s -u -v -a\
|
COMPREPLY=( $( compgen -W '$( _parse_usage "$1" )' -- "$cur" ) )
|
||||||
-e -k -p -o -r -t' -- "$cur" ) )
|
|
||||||
else
|
else
|
||||||
_known_hosts_real "$cur"
|
_known_hosts_real "$cur"
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user