From owner-svn-src-all@freebsd.org Mon Oct 30 18:39:48 2017 Return-Path: Delivered-To: svn-src-all@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 B69E7E63995; Mon, 30 Oct 2017 18:39:48 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A3DE86DB2B; Mon, 30 Oct 2017 18:39:48 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [64.201.244.132] (port=55469 helo=[10.0.0.105]) by shxd.cx with esmtps (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1e9D5n-000HDE-Ed; Mon, 30 Oct 2017 16:39:15 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r325092 - head/usr.bin/fortune/datfiles From: Devin Teske X-Mailer: iPhone Mail (13G36) In-Reply-To: <20171030151627.GA74374@FreeBSD.org> Date: Mon, 30 Oct 2017 11:39:46 -0700 Cc: Dan Mack , "src-committers@freebsd.org" , Eitan Adler , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Cy Schubert , Ed Maste , Warner Losh Content-Transfer-Encoding: quoted-printable Message-Id: <3CB26689-0D12-4E69-9BBA-58CCC3B71F3F@shxd.cx> References: <201710291851.v9TIpM0I073542@slippy.cwsent.com> <20171030151627.GA74374@FreeBSD.org> To: Alexey Dokuchaev X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Oct 2017 18:39:48 -0000 > On Oct 30, 2017, at 8:16 AM, Alexey Dokuchaev wrote: >=20 >> On Mon, Oct 30, 2017 at 09:47:22AM -0500, Dan Mack wrote: >> ... >> I use ESC-P / ESC-N a lot; it's a neat feature that tcsh has had for a >> long time, maybe since the beginning. However it's a tcsh feature, not >> sh, bash, or csh IIRC. But csh is actually tcsh on FreeBSD but I'm sure >> most people already know this on this list. >=20 > It is the same as up/down arrows? =20 In tcsh/zsh if you do not type anything first, it is like up/down arrows. If you type something first, the list is filtered by "begins with" given wha= t you have typed thus-far. > Yeah, one of the best tcsh(1) features! >=20 Better in bash which allows you to filter not only on "begins with" but also= "contains" (which is arguably more valuable than "begins with"). >> To emulate this behaviour in bash, I simply create a .inputrc file in my >> $HOME with the following contents: >>=20 >> # .inputrc field >> "\ep": history-search-backward >> "\en": history-search-forward >=20 > On GNU/Linux boxes mine has: >=20 > "\e[A": history-search-backward > "\e[B": history-search-forward >=20 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 shel= l to give you the previous command that started with that rather than the pr= evious command in-general. It would then be the case that you cannot navigate the history sequentially u= nless the input line is empty before using cursor-up/cursor-down. --=20 Devin