New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convenient history fetch facilities #10289
Comments
comment:1
From Chet Ramey:This is very similar to the operate-and-get-next feature bash adds to the readline interface. I am not inclined to add this to readline in its current form because it manipulates state managed by the calling application (rl_startup_hook) and requires that state to be kept between calls to readline(). It's a feature that should be provided by the calling application -- it's implementation is not complicated. |
comment:2
A developer of R attempted to pull the part of the Bash source code http://r.789695.n4.nabble.com/readline-operate-and-get-next-td2317208... |
comment:3
A preliminary version of the patch was uploaded. See the doc in the patch for how to bind the new readline commands with keys. I am wondering how to doctest this module. Things to do: add more comments and doctests. I copied some programming logic from the Bash shell source files, in particular, from"bashline.c", and the GNU Readline source files, in particular from the file "misc.c". Check the copyright things, although I think there is no problem. |
comment:4
Note the last two commands in the patch implements the up and down arrow keys in Magma. |
Author: Kwankyu Lee |
comment:9
This patch needs work as it does not work on Ubuntu machines. There is no problem with my Mac. On Ubuntu, the patch is compiled well, but produces "no symbol: history_length" error when it is imported on Sage startsup. Cython experts, please help me fix this problem. |
Attachment: trac_10289.patch.gz rebased on 4.8 |
This comment has been minimized.
This comment has been minimized.
Reviewer: Kwankyu Lee |
Changed author from Kwankyu Lee to none |
Using Sage, you are missing a feature of the Magma command line interface. In Magma, if you 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 you to fetch as many successive lines in history as you like. However, Sage does not have a similar feature. The IPython command prompt uses the readline library (via pyreadline), which evidently does not 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!)
See instead #12503.
Component: user interface
Reviewer: Kwankyu Lee
Issue created by migration from https://trac.sagemath.org/ticket/10289
The text was updated successfully, but these errors were encountered: