From 778db045118af97ed162e661e2feb3feef670808 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Tue, 14 Jul 2015 00:17:35 +0200 Subject: 35774: fix double formatting of date explanation message --- Completion/Unix/Type/_dates | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'Completion') 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 -- cgit v1.2.3-70-g09d2