From owner-freebsd-questions@freebsd.org Mon Oct 24 15:52:12 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 65E5BC1F2D5 for ; Mon, 24 Oct 2016 15:52:12 +0000 (UTC) (envelope-from citrin+bsd@citrin.ru) Received: from hz.citrin.ru (hz.citrin.ru [88.198.212.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B17F83B for ; Mon, 24 Oct 2016 15:52:11 +0000 (UTC) (envelope-from citrin+bsd@citrin.ru) Received: from x220.lan (c-24-60-168-172.hsd1.ct.comcast.net [24.60.168.172]) by hz.citrin.ru (Postfix) with ESMTPSA id C51662874D1 for ; Mon, 24 Oct 2016 15:52:02 +0000 (UTC) Subject: Re: csh history search To: freebsd-questions@freebsd.org References: <580E2B4F.4000003@gmail.com> From: Anton Yuzhaninov Message-ID: <99ed60e6-2132-943e-262b-1a237a6f578f@citrin.ru> Date: Mon, 24 Oct 2016 11:52:00 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <580E2B4F.4000003@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrin.ru; s=s0; t=1477324323; bh=FGg9uc+DCt4auxGj7kWC9DBnfMfPhgrMlfvtJ9m3SHQ=; h=Subject:To:References:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=1iAdOMWaxe7S872i+EdwvGH+xM3T7ZGWKDCSagSBp0NITvR8Cx3/h9XeTgoG3xS9t8cCnhBiXsSwLYY+NpskJAuMHxxv6TP6Z/rC3BrqorxVVXafXc5sdgc3g5vhViY8V0np8PXn7IEcpmaaI18v9QqhOUGI6YzUnF10sV1gNzs= 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 15:52:12 -0000 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.