From owner-svn-src-head@freebsd.org Tue Oct 31 14:56:50 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 EF6F2E5C03C; Tue, 31 Oct 2017 14:56:50 +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 C7F797CE10; Tue, 31 Oct 2017 14:56:50 +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 8A4D452C; Tue, 31 Oct 2017 09:56:48 -0500 (CDT) From: Dan Mack To: Alexey Dokuchaev 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 References: <201710291851.v9TIpM0I073542@slippy.cwsent.com> <20171030151627.GA74374@FreeBSD.org> <3CB26689-0D12-4E69-9BBA-58CCC3B71F3F@shxd.cx> <20171031060631.GA78809@FreeBSD.org> Date: Tue, 31 Oct 2017 09:56:47 -0500 In-Reply-To: <20171031060631.GA78809@FreeBSD.org> (Alexey Dokuchaev's message of "Tue, 31 Oct 2017 06:06:31 +0000") 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: Tue, 31 Oct 2017 14:56:51 -0000 Alexey Dokuchaev writes: > 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. Maybe this disconnect is related to the fact that I never use the arrow keys. I used ctrl-n/p to cycle shell history down/up and put an esc in front if I am searching using history-search-backward/forward. Dan