Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: s/pattern/pattern/g on the commandline ?
- X-seq: zsh-users 16787
- From: Jérémie Roquet <arkanosis@xxxxxxxxx>
- To: meino.cramer@xxxxxx
- Subject: Re: s/pattern/pattern/g on the commandline ?
- Date: Sat, 25 Feb 2012 19:41:16 +0100
- Authentication-results: mr.google.com; spf=pass (google.com: domain of arkanosis@xxxxxxxxx designates 10.180.74.177 as permitted sender) smtp.mail=arkanosis@xxxxxxxxx; dkim=pass header.i=arkanosis@xxxxxxxxx
- Cc: zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=XpQddblq7uRB9bsE2SVZJQ3t92UARNkqi5xdr6W9nfs=; b=rrdqCfTz/k54YErEcus7l0mgN8ChKhbnDdOFv8XHQ1hJIk7FqqzEwwovvHew4OnKIq FrlyiXlOsmOs6B0onakNsZL/614PLmjaCRrpd4uFbvQJ2Bw+oON4uOP1Mjx8ih01EZWo 4HkfsrM17vTF2RbDR25fVeY6J8x+6/SNIuso8=
- In-reply-to: <CAFOazANiYPxbbLC1UULgUznU_4mA+5W0gYPOKh5LEvAaXdVqBA@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20120225182450.GA31597@solfire> <CAFOazANiYPxbbLC1UULgUznU_4mA+5W0gYPOKh5LEvAaXdVqBA@mail.gmail.com>
2012/2/25 Jérémie Roquet <arkanosis@xxxxxxxxx>:
> !!:gs/<searched>/<replacement>/
By the way, that's for the last command, but you can also use:
!-2:gs/<searched>/<replacement>
… for the command before;
!-3:gs/<searched>/<replacement>
… and so on, as well as:
!42:gs/<searched>/<replacement>
… for the 42nd command in your history (the command's number is
displayed in your prompt if you have %! in it but you can use the
“history” command as well).
Best regards,
--
Jérémie
Messages sorted by:
Reverse Date,
Date,
Thread,
Author