Files
releases/e2e
Sebastian Spaink 02ea7b7dc2 repl: Enable bracketed paste to fix pasted tabs (#8882)
Fixes: #962

Pasting a snippet containing a tab into the REPL triggered
tab-completion on the pasted tab, corrupting the input (e.g. injecting a
completion candidate mid-line and producing a spurious parse error).
Spaces were unaffected, so the bug only surfaced with tab-indented
pastes.

The fix is bracketed paste: with it enabled, a terminal wraps pasted
text in paste markers and the line-reader inserts it literally instead
of treating an embedded tab as a completion request. The previous
reader, peterh/liner, has no bracketed-paste support and is unmaintained
(last release 2021; the same fix was proposed upstream in
peterh/liner#114 in 2019 with no traction), so this replaces it with
reeflective/readline, which supports bracketed paste, completion, and
history.

OPA's existing multi-line buffering (the r.buffer parse-retry mechanism)
is kept as-is; readline's native multi-line editing is left disabled to
avoid changing REPL behavior.

---------

Signed-off-by: Sebastian Spaink <sebastianspaink@gmail.com>
2026-07-23 14:42:50 +00:00
..

github.com/open-policy-agent/opa/e2e

This Go module is for end-to-end tests that come with dependencies we don't otherwise need for OPA, to avoid bloat in OPA's Go module's deps.

Warning

This module should never be imported from any of the other github.com/open-policy-agent/opa/* packages!