Subject: Re: _history-complete-older problems with $(
From: Bart Schaefer <[email-masked]>
To: Zsh hackers list <[email-masked]>
Date: Thu, 14 Jan 2016 19:05:32 -0800
List-Id: Zsh Workers List <zsh-workers.zsh.org>

On Jan 14, 11:55am, Sebastian Gniazdowski wrote:
} Subject: Re: _history-complete-older problems with $(
}
} I have one idea. It's generally about detecting a syntax error that
} makes shell word unbound. By appending " x" to shell word and running
} (Z+n+) one can obtain either 1 or 2 elements and first signals a
} syntax error. For such case, SUFFIX would consist only from a space
} delimited part of the regular right part.

That should work, and in fact the completion internals do something
quite similar.