summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2016-06-18 02:04:39 +0200
committerOliver Kiddle <opk@zsh.org>2016-06-18 02:04:39 +0200
commita22f4ea8ba963d8bf5aff5a4bebad8a7c2a9ead6 (patch)
tree3c900dd8f0ad0bddad409f55bdb804dbd3fca2f5
parent2f67cd514fef304ac40d49e5bb9c40bcee31664a (diff)
downloadzsh-a22f4ea8ba963d8bf5aff5a4bebad8a7c2a9ead6.tar.gz
zsh-a22f4ea8ba963d8bf5aff5a4bebad8a7c2a9ead6.tar.xz
zsh-a22f4ea8ba963d8bf5aff5a4bebad8a7c2a9ead6.zip
38713: don't add calendar matches when not immediately entering menu selection
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Unix/Type/_dates3
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 9a7f1db05..4efaa1b22 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2016-06-18  Oliver Kiddle  <opk@zsh.org>
 
+	* 38713: Completion/Unix/Type/_dates: don't add calendar matches
+	when not immediately entering menu selection
+
 	* 38707: Completion/Zsh/Type/_globquals,
 	Completion/Unix/Type/_files, Completion/Unix/Type/_path_files:
 	strip suffix for glob qualifier completion
diff --git a/Completion/Unix/Type/_dates b/Completion/Unix/Type/_dates
index 83397b45a..e4fa62e48 100644
--- a/Completion/Unix/Type/_dates
+++ b/Completion/Unix/Type/_dates
@@ -9,7 +9,7 @@
 #   max-matches-length : maximum number or percentage of lines to use for
 #                        completion listing, if both are specified, the
 #                        lowest takes precedence.
-#   format             : override date format
+#   date-format        : override date format
 
 local -a disp cand expl
 local userformat format spacer=1 spacing month monstart skip match
@@ -37,6 +37,7 @@ _tags dates || return 0
 _comp_mesg=yes
 _description -2V -x dates expl date
 compadd "${@:/-X/-x}" "$expl[@]" -
+[[ -z $MENUSELECT && $WIDGET != menu-select ]] && return
 [[ -n $PREFIX$SUFFIX ]] && return 0
 (( rows )) || return 0
 compstate[list]='packed rows'