[Xpert]Accessing selection from command line

2002-07-17 Thread Ville Herva

I was wondering whether people feel that something like this should exist in
the XFree86 distribution:

  http://iki.fi/v/xsel/

Basicly, it does this:

  xsel give access to the X selection from the command line. You can paste
  stuff from the X selection to stdout and copy stuff from stdin to X
  selection. A few examples:

  echo puppa | xsel -c  # 'puppa' is now the current X selection
  echo puppa | xsel --copy  # same as above

  xsel -p | less# pastes the current X selection to less
  xsel --paste | less   # same as above

The implementation is an utter hack, and it's far from something I would
dare to suggest for inclusion as is, but I feel the idea is useful, and I
use it a lot.

 
-- v --

[EMAIL PROTECTED]
___
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert



Re: [Xpert]Accessing selection from command line

2002-07-17 Thread Peter Finderup Lund

On Fri, 12 Jul 2002, Ville Herva wrote:

 I was wondering whether people feel that something like this should exist in
 the XFree86 distribution:

Yes, please!

I was very fortunate to find xcut some months ago, which does the paste
thing but not the cut:

http://xcut.sourceforge.net/

   echo puppa | xsel -c  # 'puppa' is now the current X selection
   echo puppa | xsel --copy  # same as above

   xsel -p | less# pastes the current X selection to less
   xsel --paste | less   # same as above

Btw. it should be possible to see if stdin or stdout was a pipe and do the
right thing automatically.

-Peter

C++ is more of a rube-goldberg type thing full of high-voltages,
large chain-driven gears, sharp edges, exploding widgets, and spots to
get your fingers crushed. And because of it's complexity many (if not
most) of it's users don't know how it works, and can't tell ahead of
time what's going to cause them to loose an arm. -- Grant Edwards

___
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert