Subject: Re: Any shell has the following behaviour
From: "Dale P. Smith" <[email-masked]>
Cc: [email-masked]
Date: Mon, 22 Feb 1999 19:21:38 -0500

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:[email-masked]]
> > Sent:         20 February 1999 02:10
> > To:   [email-masked]
> > 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 [email-masked]