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

Re: _history-complete-older problems with $(



Sebastian Gniazdowski wrote on Thu, Jan 14, 2016 at 10:52:14 +0100:
> 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?

You could have the widget try both strategies.



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