delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/01/14/22:53:03

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <f60fe000901141952x55eca979ue7af914c84a010bd@mail.gmail.com>
Date: Wed, 14 Jan 2009 22:52:18 -0500
From: "Mark J. Reed" <markjreed AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: First Pass at mintty documentation; etc.
In-Reply-To: <gkm9u9$qp2$1@ger.gmane.org>
MIME-Version: 1.0
References: <496A5EDE DOT 9010204 AT veritech DOT com> <496A7038 DOT 402 AT gmail DOT com> <496B7C25 DOT 3090705 AT veritech DOT com> <496E528D DOT 1090801 AT gmail DOT com> <gkm9u9$qp2$1 AT ger DOT gmane DOT org>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Wed, Jan 14, 2009 at 10:18 PM, Andrew DeFaria wrote:
> Why not simply type Ctrl-R then the first few letters of a command (or some
> letters in the middle of a command). Works great! Requires no support from
> any terminal emulator...

True, but that's only one direction of history search, albeit the most
commonly useful one.  For those cases where you're somewhere back in
your history and need to search forward, what do you do?  The default
binding for history-search-forward is control-S; unfortunately, that's
also usually the stop character and therefore caught by the terminal
before bash ever sees it.  So you have to either change the stop
character or rebind the function, and if you rebind that one you might
as well bind the other one to something symmetric.

Also, while it's fun to customize things in .inputrc (I have mine set
to editing-mode vi, in which incidentally the / key starts a history
search), I do recommend that everyone learn the emacs keys just
because that's what bash defaults to.  Sure, if I'm going to be typing
more than a couple commands in a foreign bash setup, the first one I
type is "set -o vi".   But for short sessions in someone else's
environment it's handy to be able to use the default bindings.

--
Mark J. Reed <markjreed AT gmail DOT com>

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019