From b386bbaf29399b7845a546eae16af32af3cc9205 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Thu, 30 Jul 2015 07:38:50 +0200 Subject: [PATCH] 36119: _strftime: Add completion for zsh/datetime's strftime builtin --- ChangeLog | 3 +++ Completion/Zsh/Command/_strftime | 12 ++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 Completion/Zsh/Command/_strftime diff --git a/ChangeLog b/ChangeLog index 0d1fd009f..03e2b0953 100644 --- a/ChangeLog +++ b/ChangeLog @@ -26,6 +26,9 @@ * 36120: Completion/Unix/Command/_sort: Fix syntax error + * 36119: Completion/Zsh/Command/_strftime: Add completion for + zsh/datetime's strftime builtin + 2015-08-11 Barton E. Schaefer * 36108: NEWS: list of major changes so far since 5.0.8 diff --git a/Completion/Zsh/Command/_strftime b/Completion/Zsh/Command/_strftime new file mode 100644 index 000000000..0be7b078d --- /dev/null +++ b/Completion/Zsh/Command/_strftime @@ -0,0 +1,12 @@ +#compdef strftime + +local ret=1 expl + +_arguments -S -A '-*' -s \ + '-q[run quietly]' \ + '-r[reverse lookup using strptime]' \ + '-s+[assign result to parameter]:param:_parameters' \ + '1:format: _date_formats' \ + '2:epoch time (or date string with -r)' && ret=0 + +return ret