public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Andrew DeFaria <Andrew@DeFaria.com>
To: cygwin@cygwin.com
Subject: Re: keycodes
Date: Fri, 16 Jan 2009 10:05:00 -0000	[thread overview]
Message-ID: <gkpavg$8r0$1@ger.gmane.org> (raw)
In-Reply-To: <17393e3e0901150749sf20dd7em7af71ea7e7fd4834@mail.gmail.com>

Matt Wozniski wrote:
> On Thu, Jan 15, 2009 at 1:05 AM, Andrew DeFaria wrote:
>   
>> Andy Koppe wrote:
>>     
>>> Andrew DeFaria wrote:
>>>       
>>>>>>  > "\e[1;5A": history-search-backward
>>>>>>  > "\e[1;5B": history-search-forward
>>>>>>
>>>>>> Perhaps I don't understand this 'bash' feature, but it doesn't seem to
>>>>>> work for me.
>>>>>>             
>>>>> Start typing a command, press Ctrl-Up, and it finds the previous line in
>>>>> the history that started like that.
>>>>>           
>>>> 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...
>>>>         
>>> Yes, obviously you can bind the history search to any key you like.
>>>       
>> The points were, since you seemed to have missed them, that 1) that's the
>> default binding for bash
>>     
>
> It's a default binding for bash that does something different than the
> suggested binding.  It's great that you can do both, but they're not
> the same.  I know of both, use both, and find history-search-backward
> and history-search-forward much more useful more of the time than
> reverse-search-history and forward-search-history.
>
>   
>> and 2) it doesn't require MinTTY, nor xterm, nor
>> any particular terminal emulator. IOW it works out of the box, in fact works
>> in Cygwin's bash Windows console window
>>     
>
> It works with all terminal emulators that are set up to send CTRL+R as
> the single byte 0x12 - nearly all do by default, but there's no reason
> they have to.  xterm can be configured to send CSI 27;5;114 ~
> instead.  Andy's suggestion works with all terminal emulators that
> send CSI 1;5 A for CTRL+UP - again, most do, but not all.  There's no
> difference between the two here, apart from one binding being default
> and the other being added with .inputrc.
>
>   
>> and does not even restrict you to
>> locating only the start of a command. All win, win, win situations as I see
>> it.
>>     
>
> The fact that it's "restricted" to only working at the start of the
> line is why it's more useful more of the time for me.  I sometimes
> want to find a command that contained 'foobar' as one of its arguments
> somewhere on the line - but, much more often, I want to find that
> cryptic ctags invocation, or that find command, etc.  If I know what
> the line begins with, then searching with CTRL+R just gives me false
> positives that I need to skip over.
>
> ~Matt
>   
Like I said - to each his own...
-- 
Andrew DeFaria <http://defaria.com>
Old dog still learning - please don't shoot yet


--
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/

  reply	other threads:[~2009-01-16  6:55 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-11 21:39 First Pass at mintty documentation Lee D.Rothstein
2009-01-11 22:31 ` Andy Koppe
2009-01-11 23:03   ` Matt Wozniski
2009-01-12  4:30   ` Christopher Faylor
2009-01-12 18:25   ` First Pass at mintty documentation; etc Lee D. Rothstein
2009-01-14 23:37     ` Andy Koppe
2009-01-15  3:19       ` Andy Koppe
2009-01-15  6:03         ` console vs pty (was: Re: First Pass at mintty documentation; etc.) Andy Koppe
2009-01-15  6:54           ` Christopher Faylor
2009-01-16  6:55         ` First Pass at mintty documentation; etc Lee D. Rothstein
2009-01-16  9:57           ` Charles Wilson
2009-01-15  5:24       ` Andrew DeFaria
2009-01-15  5:44         ` Mark J. Reed
2009-01-15 12:34           ` Andrew DeFaria
2009-01-15 15:41             ` Mark J. Reed
2009-01-15  5:49         ` keycodes (was: Re: First Pass at mintty documentation; etc.) Andy Koppe
2009-01-15 12:43           ` keycodes Andrew DeFaria
2009-01-15 18:19             ` keycodes Matt Wozniski
2009-01-16 10:05               ` Andrew DeFaria [this message]
2009-01-15 15:51           ` keycodes (was: Re: First Pass at mintty documentation; etc.) Matt Wozniski
2009-01-16  5:20       ` First Pass at mintty documentation; etc Lee D. Rothstein

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='gkpavg$8r0$1@ger.gmane.org' \
    --to=andrew@defaria.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).