diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | 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 <opk@zsh.org> + + * 35774: Completion/Unix/Type/_dates: fix double + formatting of date explanation message + 2015-07-13 Daniel Hahler <zsh@thequod.de> * 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 |