Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: _date revisited



Solaris 9 and FreeBSD 4.11.

Index: Completion/Unix/Command/_date
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_date,v
retrieving revision 1.1
diff -u -r1.1 _date
--- Completion/Unix/Command/_date	3 Sep 2005 00:17:02 -0000	1.1
+++ Completion/Unix/Command/_date	7 Sep 2005 19:00:28 -0000
@@ -1,6 +1,7 @@
 #compdef date
 
-_arguments \
+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:' \
@@ -12,3 +13,26 @@
     '*=FILE*:file:_files' \
     '*=DATEFILE*:date file:_files' \
     ':format or date:'
+else
+  case "$OSTYPE" in
+	  (solaris*)
+	  _arguments \
+	    '-u[utc]' \
+	    '-a:adjustment:' \
+            ':format or date:'
+	  ;;
+	  (freebsd*)
+	  _arguments \
+	    '-u[utc]' \
+	    '-j[do not try to set date]' \
+	    '-n[only set time on current machine]' \
+	    '-d:daylight savingg time value:' \
+	    '-f:parsing format:' \
+	    '-r:seconds since epoch:' \
+	    '-t:minutes west of GMT:' \
+	    '-v:adjustment value:' \
+            ':format or date:'
+	  ;;
+  esac
+fi
+



Messages sorted by: Reverse Date, Date, Thread, Author