ZLE (at least mine, but can’t immediately find the option) can expand the line for you as you hit enter, requiring a second confirmation enter to actually execute, so that helps, and I’ve taken the habit of tab-expanding ‘!’ constructs myself immediately as I type the line.
ps: also unclear where that tab is coming from, as I have expand-history only bound to ESC prefixed combinations.
Kind regards, erik.
On 12 Jul 2026, at 10:57, Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
I'm wondering whether users use history expansion in practice, as it
does not seem to be very useful with the power of ZLE (I suppose that
one can do the same kind of things, with the advantage of seeing the
immediate effect).
It can have a surprising behavior. For instance, after "zsh -f":
qaa% echo "foo!"
dquote>
Note that bash does not have any issue here. But there is the same
behavior with the less common
echo "foo!!"
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)