-
-
Notifications
You must be signed in to change notification settings - Fork 163
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
Look into a pure Python readline replacement #185
Comments
Excuse my ignorance, but would you mind writing some rationale for this? |
Here's one motivation. Start
then pick a suggestion
zsh doesn't redraw the prompt. Now compare with bash. Maybe Another motivation is that GNU readline is GPL, which I think caused problems for Python at one point. It would be nice to have an alternative. I think Python links with Anyway, this is not all that solid an issue, hence the disclaimer that it's vague :) Some people have higher standards for interactive shells (namely zsh users) so I was just throwing this out there. As far as being pure Python, I think it would help iterate more quickly on the UI. There is a lot of precedent for that in the 3 libraries I mentioned. |
Notes: A big difference between bash and fish/zsh is that the latter two both display flag descriptions. I think it's possible to write a custom readline display hook to do this, but I'm not sure. In other words, it might be worthwhile to reuse readline for |
In summary, things I want:
|
Update: This is less urgent because I figured out how to use readline in the way I want, with /~https://github.com/oilshell/blog-code/tree/master/interactive-shell |
Update: a problem with using readline is that I don't know how to detect when the user typed past the last column in the terminal, and then clear that next line of completion suggestions. |
This is kind of vague, but it's a good first issue for somebody who already has expertise in the area. It's not something I know a ton about (other than the fact that I can't live without
set -o vi
).The author/maintainer of bpython has a lot of interesting things to say about terminals and REPLs.
http://ballingt.com/blog/
The text was updated successfully, but these errors were encountered: