Subject: Re: _history-complete-older problems with $(
From: Sebastian Gniazdowski <[email-masked]>
To: Bart Schaefer <[email-masked]>
Cc: Zsh hackers list <[email-masked]>
Date: Thu, 14 Jan 2016 10:52:14 +0100
List-Id: Zsh Workers List <zsh-workers.zsh.org>

PS. I used the "find LBUFFER myself" approach to handle following case
better ("|" is cursor):

% $(( 0 |+ 1 ))

Doing ${(z)LBUFFER} and then (z) on right part of BUFFER would produce
SUFFIX="+" instead of "+ 1 ))".  If I find the word in ${(z)BUFFER}
and divide it into two halves myself, then I have PREFIX="$(( 0 "
SUFFIX "+ 1 ))". However, following case works better with LBUFFER
approach:

% ${|a some other $words

With LBUFFER approach, PREFIX="${" SUFFIX="a" and that's better than
PREFIX="${" SUFFIX="a some other $words". I can of course respect
no_complete_in_words and do PREFIX="${a" SUFFIX="".

I'm currently looking for a way to choose better strategy, maybe
someone has some ideas?

Best regards,
Sebastian Gniazdowski