about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2015-07-14 00:17:35 +0200
committerOliver Kiddle <opk@zsh.org>2015-07-14 00:30:43 +0200
commit778db045118af97ed162e661e2feb3feef670808 (patch)
tree15e45eae34f910d3e8b5d8aa00434ae48885c6ce /Completion
parent8024de798d1b3eb0eca5772bf5c316124748e74c (diff)
downloadzsh-778db045118af97ed162e661e2feb3feef670808.tar.gz
zsh-778db045118af97ed162e661e2feb3feef670808.tar.xz
zsh-778db045118af97ed162e661e2feb3feef670808.zip
35774: fix double formatting of date explanation message
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Unix/Type/_dates11
1 files changed, 7 insertions, 4 deletions
diff --git a/Completion/Unix/Type/_dates b/Completion/Unix/Type/_dates
index 486a2c229..83397b45a 100644
--- a/Completion/Unix/Type/_dates
+++ b/Completion/Unix/Type/_dates
@@ -13,14 +13,14 @@
 
 local -a disp cand expl
 local userformat format spacer=1 spacing month monstart skip match
-local d day daysecs extra preclude r ri col explain
+local d day daysecs extra preclude r ri col
 local -a starts skips
 local -i start now mult
 local -i columns=$(( (COLUMNS+4) / 32 )) rows=LINES-4 offset=0
 local -a days=( Mo Tu We Th Fr Sa Su )
 local future mlabel mfmt mlabels
 
-zparseopts -D -K -E f:=format F=future X:=explain
+zparseopts -D -K -E f:=format F=future
 (( future = $#future ? 1 : -1 ))
 zstyle -s ':completion:$curcontext:dates' date-format userformat
 format=${userformat:-${format[2]:-%F}}
@@ -33,9 +33,12 @@ done
 (( rows = rows / 8 ))
 zmodload -i zsh/datetime || rows=0
 
-_message -e dates ${explain[2]:-date}
-(( rows )) || return
+_tags dates || return 0
+_comp_mesg=yes
 _description -2V -x dates expl date
+compadd "${@:/-X/-x}" "$expl[@]" -
+[[ -n $PREFIX$SUFFIX ]] && return 0
+(( rows )) || return 0
 compstate[list]='packed rows'
 
 if [[ $WIDGET = _next_tags ]]; then