Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bash bracketed paste - is it supported?

Tags:

bash

readline

Despite some effort, I have been unable to get the "bracketed paste" feature of Bash working.

My terminal is xterm, which supports it. My version of bash is 4.3.33(1)-release, which I think supports it, based on the date of this thread.

I have tried enabling it in a session with:

bind 'set enable-bracketed-paste on'

but that didn't seem to work.

I tried adding to my .inputrc:

set enable-bracketed-paste on

but also no luck.

This very nice feature seems to be very poorly documented, so I have had trouble finding information...

This good overview page says "...if anyone knows a better fix for bash users than 'switch to zsh', I'd like to include it here." But that page is dated before the change was made in Bash (see the thread mentioned above).

Has anyone had luck with Bash, here? What magic am I missing?

EDIT:

I see at this link that bracketed paste might not be available until readline 7.0. I currently have 6.3. Maybe that explains it? I'm not sure how that squares with the original Bash thread, which had a patch to readline...

like image 692
jwd Avatar asked Feb 24 '16 19:02

jwd


1 Answers

Welp, it works now (:

Bash 4.4, with readline 7.0, supports bracketed paste.

Enable in your session:

$ bind 'set enable-bracketed-paste on'

Or permanently in your .inputrc:

set enable-bracketed-paste on
like image 118
jwd Avatar answered Nov 09 '22 14:11

jwd