On Tuesday, July 17, 2012 3:13:18 AM UTC+9, Dima Pasechnik wrote
>
>
> More or less.
> Specifically, I want the same behaviour as in GAP. In GAP one can go to A 
> using (say) arrows keys. Then, after executing A, you get GAP prompt, just 
> as if you execute the "normal" command. But if you then hit arrow-down 
> (i.e. "next command" in history) you'll get to B.
>
> In Sage executing A brings you to the bottom of the history (which I 
> weird, IMHO).
>
>  
You can bound the arrow keys with the new readline commands as explained in 
the documentation. Note that you should edit "ipythonrc" file in your 
dot_sage folder, not ".inputrc" in your home folder. 
-------------
To bind these commands with keys, insert the relevant lines into the 
``$DOT_SAGE/ipython/ipythonrc``
file. Note that ``$DOT_SAGE`` is ``$HOME/.sage`` by default. For example,

::

    readline_parse_and_bind "\C-o": operate-and-get-next
    readline_parse_and_bind "\e[A": history-search-backward-and-save
    readline_parse_and_bind "\e[B": history-search-forward-and-save

binds the three commands with the control-o key, the up arrow key, and the 
down arrow key,
respectively. 

-- 
-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org



Reply via email to