Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Interactive search on the command line?
- X-seq: zsh-users 21005
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: Dominik Vogt <vogt@xxxxxxxxxxxxxxxxxx>
- Subject: Re: Interactive search on the command line?
- Date: Fri, 27 Nov 2015 07:34:37 +0000
- Cc: Zsh Users <zsh-users@xxxxxxx>
- 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=
- In-reply-to: <20151126080400.GA20074@linux.vnet.ibm.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: <20151126080400.GA20074@linux.vnet.ibm.com>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author