Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Oct 2017 06:06:31 +0000
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        Dan Mack <mack@macktronics.com>
Cc:        Devin Teske <devin@shxd.cx>, "src-committers@freebsd.org" <src-committers@freebsd.org>, Eitan Adler <eadler@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, Cy Schubert <Cy.Schubert@komquats.com>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, Ed Maste <emaste@freebsd.org>, Warner Losh <imp@bsdimp.com>
Subject:   Re: svn commit: r325092 - head/usr.bin/fortune/datfiles
Message-ID:  <20171031060631.GA78809@FreeBSD.org>
In-Reply-To: <m2k1zc5ng7.fsf@macktronics.com>
References:  <201710291851.v9TIpM0I073542@slippy.cwsent.com> <B855A05D-E1BB-485F-AB8D-9F9656F531CC@shxd.cx> <m28tfsofph.fsf@macktronics.com> <20171030151627.GA74374@FreeBSD.org> <3CB26689-0D12-4E69-9BBA-58CCC3B71F3F@shxd.cx> <m2k1zc5ng7.fsf@macktronics.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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<up> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20171031060631.GA78809>