Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: history expansion
- X-seq: zsh-users 30702
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: history expansion
- Date: Tue, 14 Jul 2026 13:06:17 -0700
- Arc-authentication-results: i=1; mx.google.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Ju84MaNiB1VF+UPQdEIYn2UFjmEPImEZeyAmHCXXS4k=; fh=yk3c4scJWo86Za4IR1HBNZw2a+GkUkfVQ7Fs3jnanfg=; b=aZa3xn4coVkjvdEOZPZrWnMONBPeMQ7UnQp/uQd8VyxszmOZbhzM9tKPX8EmodjRca vrtxRW9/Q/p96ixE+pnsSoLNFc3UTyDxsp/O5xrgp/eeYOJb8tpb5r157NmbuL/DxjbO 0BzzsKBLaodIpmgldjtlhOpLjezhYGR5TxqWAeTAROBiW3O0H+Me1ClQkXapEIJp5n5U 6Csm2IvA+WSS3m4QQ2qw09MXAlERac63BMH4bSYWRVjWiVfPKAHZU8FppPH0yw8T5AdE HBJe5zfI0DfnRTVURwxIbmgmmVTh/m3/3P3UVekKuoJFgJIS3a9Jol65JUy3ICtilAUE U0eQ==; darn=zsh.org
- Arc-seal: i=1; a=rsa-sha256; t=1784059592; cv=none; d=google.com; s=arc-20260327; b=D8uDruTVNv/u6VS3sOKtFfcZhlwU/c62I2JFf3wGT/1C3IWYNXs6m8mwZA9eIEK5pg J0rxgHhXRAg5B2kMk1PB+ZoC1oPy4Tml7ukaX7Bu0WKPfmYkqAUoxH9s11EJ223DgmOt XyO8f+d3Ku70gBOoPqV+HlBPOvqv9GqAlJpCVAUadeqytcpJL+T9ORhRUnlMvOQ1jeu6 XCI1hdNFYvfZFP8kOlZgGHbA0p5DZbahmeE+mz3PXPaHRl39G2gq/bDAqTK1ftam+HvL 4BpdIbaP3AHK18gq8o0yd8nTNcb0paoMdKRk507NoP0FhTarUvkqg/Ed9oq27hZxjr0g 6+Ew==
- Archived-at: <https://zsh.org/users/30702>
- In-reply-to: <20260714103544.GG719379@qaa.vinc17.org>
- List-id: <zsh-users.zsh.org>
- 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>
On Tue, Jul 14, 2026 at 3:42 AM Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
>
> Don't you use the same customization on all your machines?
I do a lot of work on auto-scaled cloud instances, it's not practical
to install zsh and export configuration to them.
> > Even though the contributed replace-string function exists, using it
> > doesn't save many keystrokes over !!:gs/foo/bar ... and oddly it
> > doesn't default to acting on the immediately previous command line the
> > way replace-argument does.
>
> How do you use this? Doesn't !!:gs/foo/bar occur at the beginning
> of the line?
Yes, !!:gs is at the beginning of the line. Sometimes it's something
like !-2:gs, but more rarely it's !*:gs where a new command name is
the first word on the line.
> My problem was more with things like
>
> echo "foo!"
You probably know this: history expansion takes place inside "..." but
not inside '...'.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author