Command line + mouse = GUI, not command line.
% set -o vi
% # hit ESC to go into vi cmd mode, hit k a few times until
% # you get to this old command in your command history:
% longasscommand -with -params -i super.dont -w ant2 -type in -again
% # you want just the stuff from -params to ant2, so you
% # type "f-n" to get the cursor to -params, then "yf2"
% # to copy everything from there to -w ant2
% # now you type j a couple times to go back down to
% # the line you were working on:
% longasscommand -with -oh jesus -not this.shit -again
% # now you hit "f-nn" to put the cursor on the -not
% # type "dW." to get it just so:
% longasscommand -with -oh jesus -again
% # now you're ready to paste in your copy after jesus
% # so you type p, and it's inserted where you left the cursor:
% longasscommand -with -oh jesus -params -i super.dont -w ant2 -again
You can use screen or tmux to copy and paste from anything on the screen, including using the mouse. It's really out of the purview of bash, tho.Really handy tools on the Mac are pbpaste which sends any text in the system clipboard to stdout and pbcopy, which you can prolly guess at.
I don't know how I lived without knowing that this is a thing.
Edit: this is in reply to the comment at the same level of this one, can't hit reply on it
There's an anti-flamefest delay on comment threads: you can't reply to comments younger than a few (5?) minutes. However, if you go to the comment directly (click on the timestamp next to it), you do get the option to reply immediately.