[Top][All Lists]

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

Re: [Bug-readline] Not a bug but a wish

From: Chet Ramey
Subject: Re: [Bug-readline] Not a bug but a wish
Date: Thu, 28 May 2009 09:43:53 -0400
User-agent: Thunderbird (Macintosh/20090302)

Kwankyu Lee wrote:
> Dear Readline Maintainer,
> I am a user of Sage, a computer algebra system relying on GNU readline
> library. In Sage FAQ, you can find the following article. (Magma is
> another computer algebra system relying on "readline" via IPython)
>       1. Why is Sage's command history different than Magma's
>     * QUESTION: Using Sage, I am missing a feature of Magma command line
>       interface. In Magma, if I enter a line found in history using up
>       arrow key, and then press down arrow key, then the next line in
>       history is fetched. This feature allows me to fetch as many
>       successive lines in history as like. Does Sage(or readline) have a
>       similar feature? 
>     * ANSWER: No, Sage does not have a similar feature. The IPython
>       command prompt uses the readline library (via pyreadline), which
>       evidently doesn't support this feature. Magma has its own custom
>       "readline-like" library, which does support this feature. (Since
>       so many people have requested this feature, if anybody can figure
>       out how to implement it, then such an implementation would
>       certainly be welcome!) 
> It seems that the only way Sage can have the convenient feature is that
> GNU readline library have such a feature in its history facility. I wish
> this happens in the new version of the GNU readline library. Thank you
> for your attention. Have a nice day.

I'm not sure who wrote the "answer" above, but he didn't look very hard.
Readline already supports such a feature, and binds some common arrow key
sequences to the next-history and previous-history commands.  If your
arrow keys produce different key sequences, you can certainly bind them
yourself in your inputrc file.

``The lyf so short, the craft so long to lerne.'' - Chaucer

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

reply via email to

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