Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: s/pattern/pattern/g on the commandline ?
- X-seq: zsh-users 16792
- From: Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx>
- To: Moritz Bunkus <moritz@xxxxxxxxxx>
- Subject: Re: s/pattern/pattern/g on the commandline ?
- Date: Sat, 25 Feb 2012 11:24:09 -0800
- Cc: zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d201107; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=UNNCfUaljKvIueVCvdW633Vld5GtcVpEMYKibfd2ias=; b=hgYydkxaR3c2CUJ89HLFK3cGN+yIVjTHi3FQ0AbqgwMlbmNax/aVlnIek8zS2cjJ6CMg8RQVuMqZ4FSIzA9ZrWEsgwaDyX0P+gAZIPCAH3yP6MmjZbQ57/LaghIv0Zw+rN4dQnpEGkJUpAk0DJ1kTyb/yeBuaoK7X6BkYgbEe0Y=;
- In-reply-to: <CANPayMT_uqnE=LCnKLh4NKwJiMpOwpmsd3mgDfxf7df=KVNm-w@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>
- Mail-followup-to: Moritz Bunkus <moritz@xxxxxxxxxx>, zsh-users@xxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20120225182450.GA31597@solfire> <CAFOazANiYPxbbLC1UULgUznU_4mA+5W0gYPOKh5LEvAaXdVqBA@mail.gmail.com> <CAFOazAN6DK5eQ9hZBNAm-HwCtsF4B4S9_y8g5mYTwEmZC=h09w@mail.gmail.com> <CANPayMT_uqnE=LCnKLh4NKwJiMpOwpmsd3mgDfxf7df=KVNm-w@mail.gmail.com>
On 2012-02-25 at 19:46 +0100, Moritz Bunkus wrote:
> while we're at it: is there a way to do history expansion without
> actually submitting the modified entry? Meaning I would like to verify
> that my regex fu was strong enough to produce the correct command
> before submitting it. "!!:gs/what/ever" executes the command directly
> if I'm not mistaken.
setopt hist_verify
Note: if you *really* want to be able to edit your command-line with
something with the full power of a text editor, then sometimes there's
no substitute for a text-editor.
bindkey '^[v' edit-command-line
Then pressing esc-v will invoke $VISUAL (else $EDITOR, else vi) as a
text-editor for adjusting the current command-line. So <up> and then
<esc>-v will let you do as much as you need.
Be careful to not suspect the text-editor, only save and exit when
you're done.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author