You are not logged in.

#1 2005-01-09 02:22:30

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Paste from X app into bash script?

All around these boards, there are scripts, PKGBUILDs, etc posted by various archers, usually as [CODE]. I can't find a way to copy them into a usable file.

Any suggestions, or do I have to manually retype them?

Offline

#2 2005-01-09 02:37:12

kill
Member
Registered: 2004-09-30
Posts: 126

Re: Paste from X app into bash script?

shift+ins

works for vi while in bash,  Also works for konsole.

Offline

#3 2005-01-09 02:41:34

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Paste from X app into bash script?

Excellent kill - thanks.

Works in nano and xedit too, by the way.

Offline

#4 2005-01-09 11:17:11

cmp
Member
Registered: 2005-01-03
Posts: 350

Re: Paste from X app into bash script?

nice,
can you also copy from a terminal window?

Offline

#5 2005-01-09 12:36:59

neri
Forum Fellow
From: Victoria, Canada
Registered: 2003-05-04
Posts: 553

Re: Paste from X app into bash script?

what is marked in a window mostly can be inserted by middleclicking too,btw

-neri

Offline

#6 2005-01-19 06:06:43

skoal
Member
From: Frequent Flyer Underworld
Registered: 2004-03-23
Posts: 612
Website

Re: Paste from X app into bash script?

If you use "vi" as your editor of choice, a handy thing to do when cutting/pasting is this:

:set paste

Then, copy and paste whatever you want into the open "vi" file.  I use the middle mouse button for everything.  After you are done,

:set nopaste

* That will resolve a lot of formatting problems.

Offline

#7 2005-01-19 20:04:23

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Paste from X app into bash script?

terminal copy/paste mini-HOWTO:

copying from a terminal: left-click highlight what you wish to copy. it is automatically copied to X's buffer

pasting to a terminal: move the cursor where you'd like and middle click

how I do it:
* oh, nice PKGBUILD, let me try it
* mkdir <pkgname>
* nano PKGBUILD (doesn't exist)
* copy from firefox
* middle click in nano
* <C-O> <C-X> makepkg -cf

Offline

#8 2005-01-19 22:12:28

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: Paste from X app into bash script?

phrakture wrote:

* nano PKGBUILD (doesn't exist)

nano -w PKGBUILD is safer ("Disable wrapping of long lines.").
or add:
set nowrap
to /etc/nanorc

Offline

#9 2005-01-20 00:50:36

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Paste from X app into bash script?

lanrat wrote:
phrakture wrote:

* nano PKGBUILD (doesn't exist)

nano -w PKGBUILD is safer ("Disable wrapping of long lines.").
or add:
set nowrap
to /etc/nanorc

or alias nano="nano -w" to your profile... like me...

Offline

Board footer

Powered by FluxBB