Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: BUG: calendar style date completion broken



On 16 Oct 2019, at 14:59, Manuel Presnitz <mpy@xxxxxxx> wrote:
> Instead of a nicely formatted calendar you get some garbage to
> select from.
>
> Unfortunately I wasn't able to fix this bug myself, as the completion
> system is (still) black magic for me, so I could not supply a patch.

I don't think i've ever used this function before, so someone should probably
confirm that it's all there, but this seems to bring the calendar back for me
at least

dana


diff --git a/Completion/Unix/Type/_dates b/Completion/Unix/Type/_dates
index 0af10eb24..b75b3af0c 100644
--- a/Completion/Unix/Type/_dates
+++ b/Completion/Unix/Type/_dates
@@ -73,7 +73,7 @@ for ((;rows;rows--)); do
   (( spacing = COLUMNS - 32 * columns + 2 ))
   disp[-1]="${(l.spacing.)}"
   (( spacing < 2 )) && spacer=0 disp[-1]=()
-  expl[1+expl[(i)-V]]=dates-$rows
+  expl[1+expl[(i)-J]]=dates-$rows
   compadd -x "$mlabels" "$expl[@]" -d disp -E $(( $#disp ))
 
   for ((line=0;line<6;line++)); do



Messages sorted by: Reverse Date, Date, Thread, Author