Re: history expansion

Erik Wybouw <[email protected]> Sun, 12 Jul 2026 12:05:07 +0200
Newsgroups gmane.comp.shells.zsh.devel,gmane.comp.shells.zsh.user
Message-ID <[email protected]>
I use it a lot (coming from tcsh where I developed the muscle memory for it).

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.
—
Erik Wybouw



> On 12 Jul 2026, at 10:57, Vincent Lefevre <[email protected]> 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 <[email protected]> - 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)
>