zsh-users
 help / color / mirror / code / Atom feed
* history expansion
@ 2002-04-30 16:33 Roman Neuhauser
  2002-04-30 16:43 ` Bart Schaefer
  0 siblings, 1 reply; 21+ messages in thread
From: Roman Neuhauser @ 2002-04-30 16:33 UTC (permalink / raw)
  To: zsh users

Is there a way ^foo^bar substitution could replace all occurrences of
foo in the preceding event like !!:gs/foo/bar/? I've rtfm'd, and it
doesn't look like it's doable, but I might've overlooked something.

-- 
FreeBSD 4.4-STABLE
6:26PM up 1 day, 8:52, 14 users, load averages: 0.06, 0.06, 0.02


^ permalink raw reply	[flat|nested] 21+ messages in thread
* history expansion
@ 2002-09-25 10:33 Roman Neuhauser
  2002-09-25 23:43 ` Bart Schaefer
  0 siblings, 1 reply; 21+ messages in thread
From: Roman Neuhauser @ 2002-09-25 10:33 UTC (permalink / raw)
  To: zsh users

hi there,

is there a setopt (or another way) that would allow me to do stuff like
this:

    % !!:s/!!3/!-2:s,foo,bar,/

without the need to use variables?

-- 
begin 666 nonexistent.vbs
FreeBSD 4.7-RC
12:24PM up 7 days, 19:39, 27 users, load averages: 0.00, 0.01, 0.00
end


^ permalink raw reply	[flat|nested] 21+ messages in thread
* history expansion
@ 2020-02-20 12:44 Pier Paolo Grassi
  2020-02-20 13:05 ` Vin Shelton
  0 siblings, 1 reply; 21+ messages in thread
From: Pier Paolo Grassi @ 2020-02-20 12:44 UTC (permalink / raw)
  To: Zsh-Users List

[-- Attachment #1: Type: text/plain, Size: 700 bytes --]

hello, history expansion is quite the powerful syntax for re-executing
commands from history with various functionalities for automatic
transformation. Since it happens before alias expansion it is not possibile
to simplify the access to these functionalities though, and one have to
remember and type every time the right syntax, and in case of error you
have to type everything again.
Is that it or am I missing some way to reuse it?
I have just thought of a custom widget that could add to $BUFFER a history
command of one's choice, are there other ways?

Pier Paolo Grassi
linkedin: https://www.linkedin.com/in/pier-paolo-grassi-19300217
founder: https://www.meetup.com/it-IT/Machine-Learning-TO

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2020-02-22  1:03 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-30 16:33 history expansion Roman Neuhauser
2002-04-30 16:43 ` Bart Schaefer
2002-05-06 12:51   ` Roman Neuhauser
2002-05-06 12:43     ` Borsenkow Andrej
2002-05-06 13:11       ` Roman Neuhauser
2002-09-25 10:33 Roman Neuhauser
2002-09-25 23:43 ` Bart Schaefer
2002-09-26 10:12   ` Roman Neuhauser
     [not found]     ` <20465.1033036099@csr.com>
2002-09-26 17:05       ` Bart Schaefer
2002-09-26 17:32         ` Roman Neuhauser
2020-02-20 12:44 Pier Paolo Grassi
2020-02-20 13:05 ` Vin Shelton
2020-02-20 13:19   ` Pier Paolo Grassi
2020-02-20 13:25     ` Vin Shelton
2020-02-20 13:29       ` Pier Paolo Grassi
2020-02-20 15:25         ` Mikael Magnusson
2020-02-20 15:31           ` Pier Paolo Grassi
2020-02-21 22:50             ` gi1242+zsh
2020-02-22  0:21               ` Pier Paolo Grassi
2020-02-22  0:36     ` Bart Schaefer
2020-02-22  1:01       ` Pier Paolo Grassi

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).