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 --- ChangeLog | 5 +++++ Completion/Unix/Type/_dates | 11 +++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 354418d05..3fa976ab9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-07-13 Oliver Kiddle + + * 35774: Completion/Unix/Type/_dates: fix double + formatting of date explanation message + 2015-07-13 Daniel Hahler * 35779: Completion/Unix/Command/_git: _git-config: remove 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 1.4.1