Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: history expansion
- X-seq: zsh-users 30714
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: history expansion
- Date: Fri, 17 Jul 2026 00:51:36 +0200
- Archived-at: <https://zsh.org/users/30714>
- In-reply-to: <CAH+w=7Zv4jpa-RQA+09cKTaeCYKtZe=-ZDo01vo8j=3Zc9kC=g@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- Mail-followup-to: zsh-users@xxxxxxx
- References: <20260712085723.GA719379@qaa.vinc17.org> <AB1505A3-F3EF-4DF2-86A7-D827F6FF6B3A@gmail.com> <CAA=-s3xAjkK1jcQ+zJFqNgF_1xkezLudrnenjttGxoZPMsUf0g@mail.gmail.com> <CAH+w=7a9mCwLeHxyM-30CkHVEVyLYs68FfAshNzKCOLPTUBQ6g@mail.gmail.com> <20260714103544.GG719379@qaa.vinc17.org> <CAH+w=7YiEiJYM90WnqG15Dyv8+j+N=8Jex_rN7j8GWUNEud4ig@mail.gmail.com> <20260715225317.GA75013@qaa.vinc17.org> <CAH+w=7Zv4jpa-RQA+09cKTaeCYKtZe=-ZDo01vo8j=3Zc9kC=g@mail.gmail.com>
On 2026-07-16 11:51:11 -0700, Bart Schaefer wrote:
> On Wed, Jul 15, 2026 at 3:53 PM Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
> >
> > On 2026-07-14 13:06:17 -0700, Bart Schaefer wrote:
> > > On Tue, Jul 14, 2026 at 3:42 AM Vincent Lefevre <vincent@xxxxxxxxxx> 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.)
History expansion is involved, in the sense that !" has a special
meaning (as opposed to shells without history expansion).
--
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)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author