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

Strip paste-bracketing control characters #250

Merged
merged 2 commits into from
Aug 1, 2022

Conversation

anewusername
Copy link
Contributor

This fixes downstream blink1073/oct2py#237 and blink1073/oct2py#248 as well as addressing the cause behind #228 .

The rationale is complicated somewhat by the fact that python disabled bracketed paste mode soon after #228, so that test doesn't fail anymore. I added a test that would fail without stripping the bracketing, by explicitly enabling it.

I think this is still the right place for this code (rather than downstream), since the readline default is to include the control characters, so I expect that stripping them will be common across multiple REPLs (including some bash invocations).

readline adds these by default, though that default is overridden in
bash and python. It is not overriden in Octave and likely other REPLs as
well.
Copy link
Contributor

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I'll cut a release early next week.

@blink1073 blink1073 added the bug label Aug 1, 2022
@blink1073 blink1073 merged commit 68b0da7 into Calysto:main Aug 1, 2022
@QuLogic
Copy link
Contributor

QuLogic commented Aug 18, 2022

I thought this might also have fixed Calysto/octave_kernel#215, but it doesn't seem like it did? Should something else be done here, or should a similar change be applied to octave_kernel?

@blink1073
Copy link
Contributor

Octave kernel is using run_command, so there shouldn't be anything extra to do there. I don't have Fedora set up to verify.

@QuLogic
Copy link
Contributor

QuLogic commented Sep 16, 2022

Unfortunately not, using metakernel 0.29.2, then Calysto/octave_kernel#215 is not fixed.

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

Successfully merging this pull request may close these issues.

3 participants