Bug 253142 - devel/readline: disable bracketed paste by default
Summary: devel/readline: disable bracketed paste by default
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-31 22:09 UTC by ice
Modified: 2021-07-14 01:10 UTC (History)
7 users (show)

See Also:
bugzilla: maintainer-feedback? (sunpoet)


Attachments
Rough patch to make this behavior configurable (737 bytes, patch)
2021-07-02 16:41 UTC, j.david.lists
no flags Details | Diff
ports tree patch for bracketed paste as default-off option (627 bytes, patch)
2021-07-02 19:56 UTC, Michael Büker
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ice 2021-01-31 22:09:30 UTC
Readline 8.1 by default enables bracketed paste (by having introduced a new configure option, --enable-bracketed-paste-default, which is on by default).

This seems like quite the behaviour change to chuck on unsuspecting people, so I'm suggesting to add --disable-bracketed-paste-default to CONFIGURE_ARGS.

On the off chance I am not the only one ticked off by this, adding 'set enable-bracketed-paste off' is the way to turn it off[*]. Since now there is a(nother) publicly documented way people may find, feel free to WONTFIX.

* as helpfully shown on https://www.garyshood.com/bash-highlight/
Comment 1 Chris Hutchinson 2021-02-02 19:26:25 UTC
Can I request that if the proposed option:
'set enable-bracketed-paste off'
is incorporated. That it be on by DEFAULT?
I too feel this is an astonishment. That can
cause too much unexpected outcome for no
*immediately* apparent reason.

Thanks
Comment 2 Michael Büker 2021-06-07 07:20:53 UTC
Quite a number of users appear to be irritated by this, myself included. These forum threads are fruther evidence:
https://forums.freebsd.org/threads/freebsd-13-annoyances.79815/post-505975
https://forums.freebsd.org/threads/pasting-into-bash-changed-recently.80783/

POLA would suggest restoring the previous behaviour, and offering the new upstream default as an off-by-default option. The relevant ./configure option appears to be --disable-bracketed-paste-default.
Comment 3 Michael Osipov 2021-06-15 10:28:43 UTC
I would support this request. I had to bisect readline source code to understand where this bug -- feature -- comes from.
Comment 4 j.david.lists 2021-07-02 16:41:18 UTC
Created attachment 226173 [details]
Rough patch to make this behavior configurable

I, too, find this new behavior maddening.

Here's a rough swing at a patch adding a port option to make it configurable.

The patch probably needs some cleanup; I'm not very familiar with the complex style guidelines used by the FreeBSD ports tree.  

Perhaps it will serve as a useful starting point for someone who better knows what they're doing.
Comment 5 j.david.lists 2021-07-02 16:44:34 UTC
Also, could someone with privileges to do so (@freebsd.org or the original reporter) please update "Importance" from "Affects Only Me" to "Affects Many People?"
Comment 6 Michael Büker 2021-07-02 19:56:23 UTC
Created attachment 226180 [details]
ports tree patch for bracketed paste as default-off option

Thank you for your work, j.david -- I've taken your patch and brought it (hopefully) in line with the guidelines of the Porter's Handbook.

I tested this and found it to work as expected with `poudriere testport` on 13.0-RELEASE-p3.
Comment 7 j.david.lists 2021-07-03 01:33:49 UTC
That's great, thank you, Michael!

And I fully agree with you about the POLA here, especially since FreeBSD's official implementation of the readline interface is libedit, which does not exhibit this functionality.

It seems very valuable for the two to behave as similarly as possible by default while still allowing people who want the other behavior to obtain it through the option.
Comment 8 j.david.lists 2021-07-12 14:45:36 UTC
What needs to happen now to make further progress on this issue?