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

Dedicated console library? #40

Open
ScottFreeCode opened this issue Oct 18, 2021 · 2 comments
Open

Dedicated console library? #40

ScottFreeCode opened this issue Oct 18, 2021 · 2 comments
Labels
enhancement New feature or request research needed

Comments

@ScottFreeCode
Copy link
Contributor

The Touchstone develop console lacks many common console/shell features such as command history via up and down keys, jumping over words by holding control or alt/option while pressing left or right, home and end or other shortcuts to the beginning and end of a line, holding alt or option while pressing delete/backspace to delete entire words, etc.

It would be great if some Python library for console apps could supply these features for Touchstone without having to reimplement them. Bonus points if tab completion is also possible using such a system.

@shanejansen shanejansen added research needed enhancement New feature or request labels Nov 2, 2021
@ScottFreeCode
Copy link
Contributor Author

One candidate is prompt-toolkit. This looks like it provides just about everything we need, and more we don't; at its most basic it's a drop-in for the input function, so we could start there.

The tutorial covers the essentials (prompts with a sane repl, autocompletion – although I am not sure if that can be updated dynamically as tests are edited? – and history). History can be persisted to a file somewhere in case of Touchstone crashing.

@ScottFreeCode
Copy link
Contributor Author

Cmd might be an alternative? The documentation is harder to make sense of.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request research needed
Projects
None yet
Development

No branches or pull requests

2 participants