From owner-svn-src-head@freebsd.org Tue Oct 31 06:06:31 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 EA87AE4F481; Tue, 31 Oct 2017 06:06:31 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C73136476B; Tue, 31 Oct 2017 06:06:31 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 2378A1D1E8; Tue, 31 Oct 2017 06:06:31 +0000 (UTC) Date: Tue, 31 Oct 2017 06:06:31 +0000 From: Alexey Dokuchaev To: Dan Mack Cc: Devin Teske , "src-committers@freebsd.org" , Eitan Adler , "svn-src-all@freebsd.org" , Cy Schubert , "svn-src-head@freebsd.org" , Ed Maste , Warner Losh Subject: Re: svn commit: r325092 - head/usr.bin/fortune/datfiles Message-ID: <20171031060631.GA78809@FreeBSD.org> References: <201710291851.v9TIpM0I073542@slippy.cwsent.com> <20171030151627.GA74374@FreeBSD.org> <3CB26689-0D12-4E69-9BBA-58CCC3B71F3F@shxd.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.3 (2017-05-23) 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: Tue, 31 Oct 2017 06:06:32 -0000 On Mon, Oct 30, 2017 at 04:35:04PM -0500, Dan Mack wrote: > 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. Agreed, search-by-prefix needed a lot more often than ^R one (search anywhere). That's why it makes sense to bind it to the arrows. > >>> "\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. That's exactly what I want, to type vi and instantly get to the editing command (skipping all cd's and ls's I might've done in between). > 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. I find this separation useless and actually mitigating the good. When I want to scroll the history without any search I'd simply won't type anything. Binding prefix-search to ESC-p/ESC-n, not up-arrow/down-arrow is beyond me. Empty command line gives you plain iteratation, typing anything limit iteratation over commands starting with typed prefix. ./danfe