This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project. See the Cygwin home page for more information.
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]

Re: Any shell has the following behaviour



Ah yes, 4dos.  I remember it well.  The *only* way to use dos.

The Ctrl-r in bash is not quite the same thing.  It searches through all
of the
history, not just the start of commands.  For example, it will find
every command
*and* *argument* that has `ls' it it, not just `ls' commands.

The way to get 4dos functionality in bash is with
`history-search-backward'
and `history-search-forward'.  They do a non-incremental search (you
can't add to
the search string) with the contents of the command line.  From the man
page:

history-search-backward
          Search backward through the history for the  string
          of characters between the start of the current line
          and the point.  This is a non-incremental search.

I usually bind it to Ctrl-Up (and history-search-forward to Ctrl-Down).

The problem with it is is you have to have something on the command line
to use as a search string.

Dale

Graham Murray wrote:
> 
> Yes, bash.
> Type ^R then start typing the command and it give you the matches.
> 
> > ----------
> > From:         alex[SMTP:tinbb@hkplanet.com]
> > Sent:         20 February 1999 02:10
> > To:   cygwin@sourceware.cygnus.com
> > Subject:      Any shell has the following behaviour
> >
> > Hi,
> >     Is there any shell which the command line history function like
> > 4DOS ?
> > In 4DOS, it will remember what you typed before and it will match the
> > command for you during you type. I know that there are many shell
> > support command line history but i can't find a shell which can match
> > the command for you.

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com