knqyf263 / pet

Simple command-line snippet manager
MIT License
4.41k stars 222 forks source link

Fix for #251 - 200~ and 200~ characters when pasting into Parameter f… #252

Closed jaroslawhartman closed 6 months ago

jaroslawhartman commented 7 months ago

Issue #, if available:

251

Description of changes:

Issue

image

Note 200~ and 201~ at the beginning and end of the text in the 2nd field.

Fix

This seems to be ZSH incompatibility problem between 5.0.8 and 5.1:

Incompatibilites between 5.0.8 and 5.1

The default behaviour when text is pasted into an X Windows terminal has changed significantly (unless you are using a very old terminal emulator that doesn't support this mode). Now, the new "bracketed paste mode" treats all the pasted text as literal characters. This means, in particular, that a newline is simply inserted as a visible newline; you need to hit Return on the keyboard to execute the pasted text in one go. See the description of zle_bracketed_paste in the zshparams manual for more. "unset zle_bracketed_paste" restores the previous behaviour.

Fix: add unset zle_bracketed_past to the snippets.

When added, the problem is no longer there:

image

I will rasie a PR.

Best regards, Jarek

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

RamiAwar commented 6 months ago

No longer an issue?