From owner-svn-src-head@freebsd.org Mon Oct 30 21:35:12 2017 Return-Path: Delivered-To: svn-src-head@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 CAD47E66234; Mon, 30 Oct 2017 21:35:12 +0000 (UTC) (envelope-from mack@macktronics.com) Received: from borg.macktronics.com (gw.macktronics.com [209.181.253.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A429072EE0; Mon, 30 Oct 2017 21:35:11 +0000 (UTC) (envelope-from mack@macktronics.com) Received: from pandora.local (olive.macktronics.com [209.181.253.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by borg.macktronics.com (Postfix) with ESMTPS id 2552343A; Mon, 30 Oct 2017 16:35:06 -0500 (CDT) From: Dan Mack To: Devin Teske Cc: Alexey Dokuchaev , "src-committers\@freebsd.org" , Eitan Adler , "svn-src-all\@freebsd.org" , "svn-src-head\@freebsd.org" , Cy Schubert , Ed Maste , Warner Losh Subject: Re: svn commit: r325092 - head/usr.bin/fortune/datfiles References: <201710291851.v9TIpM0I073542@slippy.cwsent.com> <20171030151627.GA74374@FreeBSD.org> <3CB26689-0D12-4E69-9BBA-58CCC3B71F3F@shxd.cx> Date: Mon, 30 Oct 2017 16:35:04 -0500 In-Reply-To: <3CB26689-0D12-4E69-9BBA-58CCC3B71F3F@shxd.cx> (Devin Teske's message of "Mon, 30 Oct 2017 11:39:46 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Oct 2017 21:35:12 -0000 Devin Teske writes: > Better in bash which allows you to filter not only on "begins with" > but also "contains" (which is arguably more valuable than "begins > with"). Definately different. Better? Maybe for some. I most always search command history by prefix and then just using multiple ESC-p invocations to find the one command to edit/re-execute. Less frequently I want to search the whole text of history for the whole command line sequence like bash Ctrl-R accomplishes. >>> To emulate this behaviour in bash, I simply create a .inputrc file in my >>> $HOME with the following contents: >>> >>> # .inputrc file >>> "\ep": history-search-backward >>> "\en": history-search-forward > Interesting that you mapped these to cursor-up/cursor-down. > > That may cause unexpected results. > For example, typing something and then pressing up-arrow will cause > the shell to give you the previous command that started with that > rather than the previous command in-general. It's ESC-p/ESC-n, not just plain up-arrow/down-arrow. Up arrow still does up without any search. At least with my config using \ep as shown. My up arrows work for me as expected - they just iterate forward and backward through shell history. Dan