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

Fix prompt character input #34

Merged
merged 3 commits into from Aug 1, 2020
Merged

Fix prompt character input #34

merged 3 commits into from Aug 1, 2020

Conversation

mehalter
Copy link
Contributor

@mehalter mehalter commented Aug 1, 2020

When using the prompts, the behavior is not correct. If it prompts me to update PATH, I have to type n and then a carriage return to trigger the read to finish. It then reads a character, n and on the second prompt asking to update FPATH, the read already has another character to read which is the \n to finish the previous read. This means to deny the second prompt you must preemptively type nn\n on the first question. This changes the tty mode so that it reads the raw character input, prompts, reads a single character, and puts the tty mode back. This fixes this bug and also makes it so you don't have to press return on prompts.

@mehalter
Copy link
Contributor Author

mehalter commented Aug 1, 2020

I'm not super happy with this implementation, but I'm not sure how else to fix this bug in Julia.

@Roger-luo
Copy link
Collaborator

nice, this was indeed not correct behavior. I guess I didn't test the deny behavior much (actually I'm not sure how to test these shell commands at all) but I'll merge this first.

@Roger-luo Roger-luo merged commit c4d4009 into comonicon:master Aug 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants