From owner-freebsd-questions@freebsd.org Mon Oct 24 18:10:58 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4DF2C1FCDE for ; Mon, 24 Oct 2016 18:10:58 +0000 (UTC) (envelope-from sascha.folie@safo.at) Received: from mail.safo.at (mail.safo.at [85.126.218.74]) by mx1.freebsd.org (Postfix) with ESMTP id AA295FB2 for ; Mon, 24 Oct 2016 18:10:58 +0000 (UTC) (envelope-from sascha.folie@safo.at) Received: from lianli (lianli.safo.at [192.168.0.222]) by mail.safo.at (Postfix) with ESMTPSA id 89CB8E0127 for ; Mon, 24 Oct 2016 18:46:07 +0200 (CEST) Date: Mon, 24 Oct 2016 20:02:30 +0200 From: Sascha Folie To: freebsd-questions@freebsd.org Subject: Re: csh history search Message-Id: <20161024200230.5b6edab3b54c065ea171eff2@safo.at> In-Reply-To: <99ed60e6-2132-943e-262b-1a237a6f578f@citrin.ru> References: <580E2B4F.4000003@gmail.com> <99ed60e6-2132-943e-262b-1a237a6f578f@citrin.ru> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.29; amd64-portbld-freebsd12.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2016 18:10:59 -0000 On Mon, 24 Oct 2016 11:52:00 -0400 Anton Yuzhaninov wrote: > On 10/24/16 11:39, Ernie Luzar wrote: > > Lets say that a while back I issued this command > > ping -c 4 hometown.jones.domain.com > > > > Now I would like to retrieve that domain name from the history list. > > > > On the command line I enter !?jon > > The complete ping command is retrieved and automatically executed. > > > > I don't want the found command automatically executed, I just want the > > found command inserted to the command line being visible so I can > > manually modify it before choosing to execute it. > > If you have > > bindkey -k up history-search-backward > bindkey -k down history-search-forward > > in ~/.cshrc (there by default in FreeBSD) > > your can type > *jon* > and then using up/down arrows list all history entries matched by *jon* > and edit lime before executing. > > See > man tcsh > /history-search-backward > for more info. You can also add bindkey "^R" i-search-back to ~/.cshrc to enable CTRL+r search (like bash).