summaryrefslogtreecommitdiff
path: root/Completion/Unix/Command/_date
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2015-10-31 19:14:36 +0100
committerOliver Kiddle <opk@zsh.org>2015-10-31 19:14:36 +0100
commitfa59375e36e1718e060048ba7efd7346b3c8e94a (patch)
tree217f4c0133da5ebb0be1dae23962653cbdb59f16 /Completion/Unix/Command/_date
parent098319df9922441ca70c233195151cb1965556a8 (diff)
downloadzsh-fa59375e36e1718e060048ba7efd7346b3c8e94a.tar.gz
zsh-fa59375e36e1718e060048ba7efd7346b3c8e94a.zip
37029: update options and new tr completion
Diffstat (limited to 'Completion/Unix/Command/_date')
-rw-r--r--Completion/Unix/Command/_date17
1 files changed, 14 insertions, 3 deletions
diff --git a/Completion/Unix/Command/_date b/Completion/Unix/Command/_date
index e596ac038..ff3bac398 100644
--- a/Completion/Unix/Command/_date
+++ b/Completion/Unix/Command/_date
@@ -1,6 +1,6 @@
#compdef date gdate
-local -a args
+local -a args alts
if _pick_variant gnu="Free Software Foundation" unix --version; then
args=(
@@ -20,16 +20,27 @@ else
solaris*)
args=( '-a:adjustment' )
;;
+ darwin*|dragonfly*|netbsd*|openbsd*)
+ args+=( '-r[specify reference time]:seconds since epoch' )
+ ;|
freebsd*|darwin*|dragonfly*|netbsd*|openbsd*)
args=(
'-n[only set time on current machine]'
'-d:daylight saving time value'
'-j[do not try to set date]'
- '-r:seconds since epoch'
'-t:minutes west of GMT'
)
;|
- freebsd*) args+=( '-R[RFC2822 format]' ) ;|
+ freebsd*)
+ alts=(
+ 'seconds:sec:_guard "(0x[0-9a-fA-F]#|[0-9]#)" "seconds since epoch"'
+ 'files:file:_files'
+ )
+ args+=(
+ '-r[reference time: file modification or literal time]:reference: _alternative $alts'
+ '-R[RFC2822 format]'
+ )
+ ;|
freebsd*|dragonfly*|darwin*)
args+=( '-f:parsing format' '-v:adjustment value' )
;;