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

Re: _history-complete-older problems with $(



Bart Schaefer wrote on Tue, Jan 12, 2016 at 11:39:28 -0800:
> On Jan 12,  2:09pm, Sebastian Gniazdowski wrote:
> } Why second comadd, and
> } what does "${(@)${(@)found#$PREFIX}%$SUFFIX}" do?
> 
> Suppose you have "$(" on the line, and the completion is $((1+2)).  The
> $found array will contain "$((1+2))" (and possibly other elements).  In
> the setup to at the beginning of _widen_for_history, PREFIX="$(" was
> assigned (that $left[-1]).  So now we need to remove "$(" from the
> values in $found to get the actual string to insert to finish the word,
> i.e., "(1+2))".  Similarly we would need to remove $SUFFIX (taken from
> $right) from the end of the values if there were one.
> 

That seems to always behave as though COMPLETE_IN_WORD is set,
regardless of the value of the option.



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