Refer to buffer(mouse) in csh

With mouse, I've selected some text in terminal.
Now it is in "some" buffer, "somwhere".
How do I refer to it in csh shell?
Ie: (I will now act, like "$" holds a value of buffer)
Code:
# echo $
 
You hit middle mouse button, and text will be posted....
It's not shell specific
It works all over FreeBSD and Linux, probably on other unixes as well, not sure though

It works under X as well
 
There is no buffer in the mechanics of mouse copy/paste. When you press the 3rd button the daemon responsible for the mouse c/p will just directly read from the text that is selected and write it into input, thats why you will not be able to paste if the selection is lost. When X11 server is running the daemon responsible is the "mouse" driver that is part of the X11, when there is no X running (on FreeBSD) I think its "moused" that is handling it. So to wrap it up, in order to access the "virtual buffer" your script/app has to be able to get text selections, when you are running X11 that is possible by using xlib calls.
 
Guys. I am already constantly using middle mouse button for pasting.

It is just that I am tired of opening a file with vi, then pressing "i" and then pressing middle mouse button, to put some text in file.
and closing file with ":x"

I would rather do this (Acting, like "$" holds a value of buffer):
Code:
# echo $ >> file.txt
 
Seeker said:
I would rather do this (Acting, like "$" holds a value of buffer):
Code:
# echo $ >> file.txt
Try this:

Code:
cat >>file.txt

After that hit middle click to paste the contents and finish it off with Ctrl+D on a newline.
 
aragon said:
Try this:

Code:
cat >>file.txt

After that hit middle click to paste the contents and finish it off with Ctrl+D on a newline.

Works like a charm! :)
 
Seeker said:
Guys. I am already constantly using middle mouse button for pasting.

It is just that I am tired of opening a file with vi, then pressing "i" and then pressing middle mouse button, to put some text in file.
and closing file with ":x"

I would rather do this (Acting, like "$" holds a value of buffer):
Code:
# echo $ >> file.txt

http://tools.suckless.org/sselp, get it by installing x11/sselp.
 
Back
Top