summaryrefslogtreecommitdiff
path: root/completions/ntpdate
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2011-05-12 00:12:40 +0300
committerVille Skyttä <ville.skytta@iki.fi>2011-05-12 00:12:40 +0300
commitcfdfa76ffb821af3635733b4703b68492b28ede3 (patch)
tree4174c65e06349eb72e83a47770f0b10811d962cf /completions/ntpdate
parentc2bee3b831e1c5d9e7a13b8d5d1f8c2f88d1d7fc (diff)
downloadbash-completion-cfdfa76ffb821af3635733b4703b68492b28ede3.tar.gz
ntpdate: Use _parse_usage, add some option argument (non)completions.
Diffstat (limited to 'completions/ntpdate')
-rw-r--r--completions/ntpdate13
1 files changed, 10 insertions, 3 deletions
diff --git a/completions/ntpdate b/completions/ntpdate
index 594cddfb..0d18f102 100644
--- a/completions/ntpdate
+++ b/completions/ntpdate
@@ -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