From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3411 invoked by alias); 25 Feb 2012 19:40:53 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16792 Received: (qmail 24782 invoked from network); 25 Feb 2012 19:40:50 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_SIGNED,RCVD_IN_DNSWL_MED,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at spodhuis.org does not designate permitted sender hosts) 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=; Date: Sat, 25 Feb 2012 11:24:09 -0800 From: Phil Pennock To: Moritz Bunkus Cc: zsh-users@zsh.org Subject: Re: s/pattern/pattern/g on the commandline ? Message-ID: <20120225192409.GA65335@redoubt.spodhuis.org> Mail-Followup-To: Moritz Bunkus , zsh-users@zsh.org References: <20120225182450.GA31597@solfire> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 and then -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.