about summary refs log tree commit diff
path: root/Completion/Unix
diff options
context:
space:
mode:
authorPaul Ackersviller <packersv@users.sourceforge.net>2007-11-13 02:18:17 +0000
committerPaul Ackersviller <packersv@users.sourceforge.net>2007-11-13 02:18:17 +0000
commit97853cb3faa94f834d0987b16a5d7d7ac1426fcf (patch)
tree588324ec2a1fd346b7f47a0837b96b4c8cfde2a0 /Completion/Unix
parent7ce7b8137d447554314bfff8d8948472588721e2 (diff)
downloadzsh-97853cb3faa94f834d0987b16a5d7d7ac1426fcf.tar.gz
zsh-97853cb3faa94f834d0987b16a5d7d7ac1426fcf.tar.xz
zsh-97853cb3faa94f834d0987b16a5d7d7ac1426fcf.zip
Merge of workers/{21712,23275,23303}, i.e. up to trunk revision 1.6.
Diffstat (limited to 'Completion/Unix')
-rw-r--r--Completion/Unix/Command/_date82
1 files changed, 41 insertions, 41 deletions
diff --git a/Completion/Unix/Command/_date b/Completion/Unix/Command/_date
index 8b1b389aa..d07131dc4 100644
--- a/Completion/Unix/Command/_date
+++ b/Completion/Unix/Command/_date
@@ -1,48 +1,48 @@
 #compdef date
 
-if _pick_variant -r is_gnu gnu="Free Software Foundation" unix --version; then
-  _arguments \
-    '-d[date]:time string:' \
-    '-f[file]:date file:_files' \
-    '-I[iso-8601]:time spec:' \
-    '-r[reference]:file:_files' \
-    '-R[rfc-2822]' \
-    '-s[set]:time string:' \
-    '-u[utc]' \
-    -- \
-    '*=FILE*:file:_files' \
-    '*=DATEFILE*:date file:_files' \
-    ':format or date:'
+local -a args
+
+if _pick_variant gnu="Free Software Foundation" unix --version; then
+  args=(
+    '-d[output specified date]:time string'
+    '-f[output dates specified in file]:file:_files'
+    '-I-[iso-8601]:precision:(date hours minutes seconds)'
+    '-r[reference]:file:_files'
+    '-R[rfc-2822]'
+    '-s[set]:time string'
+    --
+    '*=FILE*:file:_files'
+    '*=DATEFILE*:date file:_files'
+  )
 else
   case "$OSTYPE" in
-	  (solaris*)
-	  _arguments \
-	    '-u[utc]' \
-	    '-a:adjustment:' \
-            ':format or date:'
-	  ;;
-	  (freebsd*)
-	  _arguments \
-	    '-u[utc]' \
-	    '-n[only set time on current machine]' \
-	    '-d:daylight savingg time value:' \
-	    '-j[do not try to set date]' \
-	    '-f:parsing format:' \
-	    '-r:seconds since epoch:' \
-	    '-t:minutes west of GMT:' \
-	    '-v:adjustment value:' \
-            ':format or date:'
-	  ;;
-	  (openbsd*)
-	  _arguments \
-	    '-u[utc]' \
-	    '-n[only set time on current machine]' \
-	    '-d:daylight savingg time value:' \
-	    '-a[gradually skew]' \
-	    '-r:seconds since epoch:' \
-	    '-t:minutes west of GMT:' \
-            ':format or date:'
-	  ;;
+    solaris*)
+      args=( '-a:adjustment' )
+    ;;
+    freebsd*)
+      args=(
+	'-n[only set time on current machine]'
+	'-d:daylight saving time value'
+	'-j[do not try to set date]'
+	'-f:parsing format'
+	'-r:seconds since epoch'
+	'-t:minutes west of GMT'
+	'-v:adjustment value'
+      )
+    ;;
+    openbsd*)
+      args=(
+	'-n[only set time on current machine]'
+	'-d:daylight saving time value'
+	'-a[gradually skew]'
+	'-r:seconds since epoch'
+	'-t:minutes west of GMT'
+      )
+    ;;
   esac
 fi
 
+_arguments \
+  '-u[display or set time in UTC]' \
+  ': :_guard "^--*" "format or date"' \
+  "$args[@]"