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

PATCH 5/5: _strftime: Add completion for zsh/datetime's strftime builtin



---
 Completion/Zsh/Command/_strftime | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 Completion/Zsh/Command/_strftime

diff --git a/Completion/Zsh/Command/_strftime b/Completion/Zsh/Command/_strftime
new file mode 100644
index 0000000..0be7b07
--- /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
-- 
2.4.0



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