From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11903 invoked by alias); 27 Nov 2015 07:34:42 -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: 21005 Received: (qmail 26183 invoked from network); 27 Nov 2015 07:34:41 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=CBvljUViMyYYUYHqmGrTdxwVpsk=; b=DkcAv2 tjFLWtdochxGMH/QSwzhgeh4kS40O6Uf8eKUJl2Lz012lP6pagy4mJ9o4DpNTVOF FwI1bcNZURQfy3Yb4TYiGAg2bDYF8xKz5Q2kloSz8ehioqVdzFwQrS3m15Y4vqLs fcjtlxRaGR9EdhMRFGgG2aN5CMN4HzbzdRrxc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=CBvljUViMyYYUYHqmGrTdxwVpsk=; b=f9siK W6yztHXFKohg/8/g+nSSMGyVQkJD7thnHweWkvwRqldP7AetMXTfrVvBA03QDGoU Z7m2iF6NNPHU3Kk+ZL4BOMwoLYSr1LDxoa2ottsZUVBiOcUAuo39r4MecW/UK1zu EgwldoAXuL4TysgbZ+kdKTF3q0lNmD95rN3h70= X-Sasl-enc: HxmOFheuSQxFDev1veT3To/m2npXJ2lzXCA2s8a612pm 1448609680 Date: Fri, 27 Nov 2015 07:34:37 +0000 From: Daniel Shahaf To: Dominik Vogt Cc: Zsh Users Subject: Re: Interactive search on the command line? Message-ID: <20151127073437.GH1899@tarsus.local2> References: <20151126080400.GA20074@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151126080400.GA20074@linux.vnet.ibm.com> User-Agent: Mutt/1.5.21 (2010-09-15) Dominik Vogt wrote on Thu, Nov 26, 2015 at 09:04:00 +0100: > Is there a way to do an interactive search (or at least a > non-interactive string search) in the command line editor? I > often have extremely long gcc command lines where I want to delete > an option or do some editing in the middle of the command line, > and moving the cursor to the interesting spot is quite tedious. There is vi-find-next-char, which is bound by default to 'f' in vi or '^X^F' in emacs. Also, you could do: % () { gcc -Wall -std=c99 "$@" foo.c } -my-argument-here and edit the last word. Also, there is the ^foo^bar history expansion with replacement: % echo foo foo % ^foo^bar echo bar bar Daniel