You are not logged in.
Hat tip to Chris Siebenmann :
https://utcc.utoronto.ca/~cks/space/blo … asteChange
I regularly paste short lists of linefeed separated commands from a library of various instructions into bash terminal windows to accomplish small tasks.
The bash shell on my devuan system accepts the pasted content, but waits for a final interactive <enter> keypress before proceeding with command execution. I've not experienced that interactive <enter> confirmation requirement before. I understand it allows folks one last read of the commands before execution, so it's not necessarily a bad default. But after giving myself some time to try and get used to it, I've decided it's just not for me. If I copied the linefeed and pasted it, it is because I wanted the command executed ... every single time.
Thanks to Chris Siebenmann's blog I learned this interactive confirmation is a new feature of bash that can be turned off by appending this change to the "/etc/bash.bashrc" configuration :
bind 'set enable-bracketed-paste off'
Start a new shell and I'm back to middle-mouse clicking my pasted commands without having to touch the keyboard. A "win" for me; maybe for you too.
--K
Offline
Thank you for this solution. when I paste a command into a shell I also expect it to execute.
pic from 1993, new guitar day.
Offline
Hmm, I prefer it not automatically reacting - I use shell scripts if I want multi instructions operated.
(I only had one instance of auto executing on some other distro, & thought it to be a rather dodgy set up, needless to say, I ditched that particular distro promptly).
Still, we're all different, & like different things - just adding my two penneth to let our devs know that some like it how it is.
Online
Fair
As mentioned in the detailed Bash list of changes, bracketed paste mode was enabled by default starting in bash-5.1-alpha.
For folk like me, bash 5.x is a shiny new thing and losing the default ability to immediately execute pasted commands is a change to decades old behavior. I doubt Devuan (or Debian) devs will stray from the new defaults established by bash devs -- so I think you are in good shape. And to their monumental credit, the bash devs gave us an easy way to restore old behavior. In the future, should the bash devs determine the old way was the more common usage and change the default back, this same bashrc tweak can be reversed to turn the new behavior back "on" for you as well.
Offline
Thanks a lot - that new feature made me nuts!
Offline