Re: history expansion

Bart Schaefer <[email protected]> Thu, 16 Jul 2026 11:51:11 -0700
Newsgroups gmane.comp.shells.zsh.devel,gmane.comp.shells.zsh.user
Message-ID <CAH+w=7Zv4jpa-RQA+09cKTaeCYKtZe=-ZDo01vo8j=3Zc9kC=g@mail.gmail.com>
On Wed, Jul 15, 2026 at 3:53=E2=80=AFPM Vincent Lefevre <[email protected]=
> wrote:
>
> On 2026-07-14 13:06:17 -0700, Bart Schaefer wrote:
> > On Tue, Jul 14, 2026 at 3:42=E2=80=AFAM Vincent Lefevre <vincent@vinc17=
.net> wrote:
> > > My problem was more with things like
> > >
> > >   echo "foo!"
> >
> > You probably know this: history expansion takes place inside "..." but
> > not inside '...'.
>
> Perhaps I should have asked whether anyone relies on history expansion
> inside double quotes (it is supported by bash, but differently, e.g.
> no history expansion with the above command in bash).

There's no history expansion with the above command in zsh either.  !"
is the explicit "turn off history from this point forward" shortcut.

% echo "foo!"!"
foo!

(Mark has followed up about other stuff.)