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

pcli: fix terminal input in pcli threshold #4235

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

hdevalence
Copy link
Member

Describe your changes

When reading input from the terminal in pcli threshold commands, circumvent OS-imposed restrictions on line length (required for interactive editing and notably low on MacOS) by dropping into "raw mode", reading the input a byte at a time and manually printing out the read byte to the user, then return to "cooked mode" (yes, that's what it's called) after detecting \n or \r.

Issue ticket number and link

Closes #4230, which I confirmed through my own testing.

Checklist before requesting a review

  • If this code contains consensus-breaking changes, I have added the "consensus-breaking" label. Otherwise, I declare my belief that there are not consensus-breaking changes, for the following reason:

    only changes to pcli terminal handling

@hdevalence hdevalence force-pushed the fix-pcli-threshold-long-input branch from 5c12fcf to d1d908e Compare April 18, 2024 05:55
@hdevalence hdevalence merged commit 1376d4b into main Apr 18, 2024
8 checks passed
@hdevalence hdevalence deleted the fix-pcli-threshold-long-input branch April 18, 2024 15:05
@hdevalence
Copy link
Member Author

@conorsch can we pull this into the bugfix release or a soon-subsequent patch release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

pcli threshold sign hangs when pasting input into the terminal
2 participants