bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: history completion with arrow keys?


From: Chet Ramey
Subject: Re: history completion with arrow keys?
Date: Mon, 12 Nov 2001 06:40:12 -0500

> Bash and Matlab software have similar completion (with tab) and
> history (with up/down arrows).  However, Matlab does one more thing
> with the history that I can't get bash to do.  If I type in one or
> more characters of a line to the Matlab interface, then use the
> up/down arrow keys, Matlab will only scroll those commands in the
> history that are potential completions of those characters.
> 
> Is there a key sequence that can do this, like <Shift>-Up, or
> <Alt>-Up?  I tried <Ctrl>-<Alt>-<Delete>-Up.  Didn't work, not
> recommended.

There are bindable readline commands named `history-search-backward'
and `history-search-forward' that perform non-incremental searches
in the history list for the text between the start of the line and
point.  Those might be what you're looking for; try binding them to
the arrow keys and see if you like the results.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]