From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 454 invoked by alias); 29 Feb 2012 13:48:48 -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: 16813 Received: (qmail 25155 invoked from network); 29 Feb 2012 13:48:46 -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=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at mi.fu-berlin.de does not designate permitted sender hosts) Date: Wed, 29 Feb 2012 14:48:42 +0100 From: "Christoph (Stucki) von Stuckrad" To: zsh-users@zsh.org Subject: Re: s/pattern/pattern/g on the commandline ? Message-ID: <20120229134829.GA31200@localhost.mi.fu-berlin.de> Mail-Followup-To: zsh-users@zsh.org References: <20120225182450.GA31597@solfire> <20120227041300.GA3063@solfire> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Sender: "Chr. von Stuckrad" X-Originating-IP: 160.45.113.41 On Tue, 28 Feb 2012, Jérémie Roquet wrote: > > is there a way the prevent execution of the altered commandline when > > coming back from fc? > > Not that I know of. Maybe someone else on the list could help… It depends on what is wanted ... 'Just don't do anything' (without error) can be done by saving just a single Line of ':'. And if you have 'jobcontrol', hitting ^Z stopps the editor and thereby looses the conection between the tempfile of fc and command execution. Seemingly a non-zero-returnconde of the editor prevents execution, so exiting e.g. 'vim' by ':cq' (setting retcode = 1) does this. BUT I never fond out, how to put the edited lines into the history BUT NOT EXCUTE them (once I'm in the editor by fc...). So in this case I always saved to some other place and aborted editing. Stucki -- Christoph von Stuckrad * * |nickname |Mail \ Freie Universitaet Berlin |/_*|'stucki' |Tel(Mo.,Mi.):+49 30 838-75 459| Mathematik & Informatik EDV |\ *|if online| (Di,Do,Fr):+49 30 77 39 6600| Takustr. 9 / 14195 Berlin * * |on IRCnet|Fax(home): +49 30 77 39 6601/