summary refs log tree commit diff
diff options
context:
space:
mode:
authorJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2016-11-26 16:36:21 +0900
committerJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2016-11-26 16:36:21 +0900
commit53e6b12bdfdc6b835192458bbb98b81b77599e75 (patch)
tree2c4fd897a1199737190a97181931daa53b4da7ad
parent5dc7b35ff6edbecad8ee077de44d880eb7907a6f (diff)
downloadzsh-53e6b12bdfdc6b835192458bbb98b81b77599e75.tar.gz
zsh-53e6b12bdfdc6b835192458bbb98b81b77599e75.tar.xz
zsh-53e6b12bdfdc6b835192458bbb98b81b77599e75.zip
40013: process zsh-specific time format extensions correctly
-rw-r--r--ChangeLog6
-rw-r--r--Completion/Unix/Type/_date_formats4
-rw-r--r--Completion/Zsh/Command/_strftime2
3 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 0c8e81776..ab1852e6d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-11-24  Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
+
+	* 40013: Completion/Unix/Type/_date_formats,
+	Completion/Zsh/Command/_strftime: process zsh-specific time
+	format extensions correctly
+
 2016-11-25  Oliver Kiddle  <opk@zsh.org>
 
 	* unposted: Functions/Zle/surround: set new vichange flag
diff --git a/Completion/Unix/Type/_date_formats b/Completion/Unix/Type/_date_formats
index 45bda823f..6bd5c6d6b 100644
--- a/Completion/Unix/Type/_date_formats
+++ b/Completion/Unix/Type/_date_formats
@@ -32,7 +32,7 @@ specs=(
   'H:hour (00-23)'
   'I:hour (01-12)'
   'j:day of year (001-366)'
-  'k:hour ( 1-23)'
+  'k:hour ( 0-23)'
   'l:hour ( 1-12)'
   'm:month (01-12)'
   'M:minute (00-59)'
@@ -102,4 +102,4 @@ done
 
 _describe -t date-format-specifier 'date format specifier' specs \
     -p "${(Q)PREFIX:-%}" -S ''
-_message -e date-format-precision 'precision for %%. (1-6)'
+[[ $1 == zsh ]] && _message -e date-format-precision 'precision for %%. (1-6)'
diff --git a/Completion/Zsh/Command/_strftime b/Completion/Zsh/Command/_strftime
index 0be7b078d..24ff7dc3e 100644
--- a/Completion/Zsh/Command/_strftime
+++ b/Completion/Zsh/Command/_strftime
@@ -6,7 +6,7 @@ _arguments -S -A '-*' -s \
   '-q[run quietly]' \
   '-r[reverse lookup using strptime]' \
   '-s+[assign result to parameter]:param:_parameters' \
-  '1:format: _date_formats' \
+  '1:format: _date_formats zsh' \
   '2:epoch time (or date string with -r)' && ret=0
 
 return ret