FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 02-04-2009, 03:10 PM
Chris G
 
Default Terminal that doesn't embed CR in copied text - is there one?

I often cut/copy long chunks of text from terminal windows that
continue over multiple lines of the window. Is there any way to
prevent CRs being added to the pasted text?

I'm sure this *used* to work "in the old days" but now I can't find
anywhere that it seems to work.

I'm currently using xfce4-terminal but I'm quite happy to change to
another if it offers a workaround for this issue.

--
Chris Green

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 02-07-2009, 12:17 AM
Marius Gedminas
 
Default Terminal that doesn't embed CR in copied text - is there one?

On Wed, Feb 04, 2009 at 04:10:20PM +0000, Chris G wrote:
> I often cut/copy long chunks of text from terminal windows that
> continue over multiple lines of the window. Is there any way to
> prevent CRs being added to the pasted text?

You could process the clipboard contents, e.g.

$ xsel | tr '
' ' ' | xsel

> I'm sure this *used* to work "in the old days" but now I can't find
> anywhere that it seems to work.

I'm not familiar with any terminal emulator that did this, but maybe I'm
just not old enough.

> I'm currently using xfce4-terminal but I'm quite happy to change to
> another if it offers a workaround for this issue.

Marius Gedminas
--
"In general, it is safe and legal to kill your children and their children"
POSIX Prg Gt, by Donald Lewine, O'Reilly & Associates, 1991, p.110 (On process
termination)
-- http://lambda.weblogs.com/discuss/msgReader$7635?mode=day
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 02-07-2009, 10:18 AM
Chris G
 
Default Terminal that doesn't embed CR in copied text - is there one?

On Sat, Feb 07, 2009 at 03:17:33AM +0200, Marius Gedminas wrote:
> On Wed, Feb 04, 2009 at 04:10:20PM +0000, Chris G wrote:
> > I often cut/copy long chunks of text from terminal windows that
> > continue over multiple lines of the window. Is there any way to
> > prevent CRs being added to the pasted text?
>
> You could process the clipboard contents, e.g.
>
> $ xsel | tr '
' ' ' | xsel
>
Hmm, makes a bit of a chore of cut and paste though! :-)


> > I'm sure this *used* to work "in the old days" but now I can't find
> > anywhere that it seems to work.
>
> I'm not familiar with any terminal emulator that did this, but maybe I'm
> just not old enough.
>
It turns out that I was looking at "the wrong end", the newlines are
embedded in the string when it's *output* to the terminal. I was
particularly noticing it when copying ssh keys. When I output (for
example) the id_rsa.pub file I usually use 'more id_rsa.pub', this
embeds newlines in the output and if you triple click on the output
you just get one terminal wide chunk. However if I 'cat id_rsa.pub'
and triple click on the output it copies all the file which is several
'lines' on the terminal. Pasting this does what I want, it pastes the
whole key as a single line.

So "it used to work" because I used to use 'cat' to output the text! :-)

I can just use 'cat' now when I know I want to copy/paste long lines.

--
Chris Green

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 07:34 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org