[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-290-g68f7fa1

Ville Skyttä ville.skytta at iki.fi
Wed May 11 21:29:24 UTC 2011


The following commit has been merged in the master branch:
commit cfdfa76ffb821af3635733b4703b68492b28ede3
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Thu May 12 00:12:40 2011 +0300

    ntpdate: Use _parse_usage, add some option argument (non)completions.

diff --git a/completions/ntpdate b/completions/ntpdate
index 594cddf..0d18f10 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

-- 
bash-completion



More information about the Bash-completion-commits mailing list