Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: history expansion
On Thu, Jul 16, 2026 at 12:53:17AM +0200, Vincent Lefevre 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).
Yes, I do. That's routine:
converter-with-quirks filename-with-spaces-and-other-shell-hair
# process fails for whatever reason
mv !$ "###-!#^"
# days later, other directory
ls ~/some/place/\#*
transfer-with-quirks !$
for p ( !$ ) { safe-remove $p }
--
Torvalds' goal for Linux is very simple: World Domination
Stallman's goal for GNU is even simpler: Freedom
Messages sorted by:
Reverse Date,
Date,
Thread,
Author