Skip to content
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

Add terminal history. #30

Open
jghibiki opened this issue Jul 28, 2017 · 4 comments
Open

Add terminal history. #30

jghibiki opened this issue Jul 28, 2017 · 4 comments
Projects
Milestone

Comments

@jghibiki
Copy link
Collaborator

It might be helpful to add the ability to cycle through past commands with the up/down keys. May save a few keystrokes.

@dekarrin
Copy link
Member

iirc this one will require a bit of re-wiring of the input system in general. Currently, in order to prevent a deadlock on shutdown, the input thread spinlocks while waiting for stdin to signal that enter is hit. If that wait is removed naively, the input thread will always be blocking on stdin, and it won't be possible for the event-processing thread to signal that the input thread should stop waiting for a clean shutdown.

It might be possible to get around this by buffering from stdin. Some investigation is warranted.

@dekarrin dekarrin added this to Backlog in Engineering via automation Oct 17, 2018
@dekarrin
Copy link
Member

My comment made above is obsoleted by the python re-write. We'll investigate this feature again during the v0.4 release.

@dekarrin
Copy link
Member

Otherwise, if someone else wants to look into it, that's fine, but any changes to the existing codebase will not persist unless work waits until at least after the v0.1 release, after which the majority of the codebase will have been converted.

@dekarrin dekarrin added this to the v0.4 milestone Oct 17, 2018
@jghibiki
Copy link
Collaborator Author

There is a library called prompt_toolkit which is a pure-python implementation of gnu readline. However since it is pure-python it does have cross platform support. Several of the available features, are command suggestions and command history. Very easy to use library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Engineering
  
Backlog
Development

No branches or pull requests

2 participants