Greg Wooledge wrote: > On Wed, Oct 30, 2019 at 03:02:07PM -0400, songbird wrote: >> >> quick answer install and use xsel instead. >> >> >> a FYI, :) >> >> >> # did not work >> $ xclip -selection clip-board -i list-alpha > > Your subject header says, > "Subject: Re: firefox pasting using xclip replaces line ends with spaces" > > I am reporting that here, because your email body does not say what > the problem is, and there's no telling how the Subject header will be > altered as the thread progresses.
the problem is that the file is one item per line and the file is your basic utf8 or ascii like text file with [cr][lf]: $ od -c list-alpha 0000000 a c o n i t e \r \n a l f a l f a 0000020 \r \n a l l i u m s ( b l u e , 0000040 p u r p l e ) \r \n a s t e r s 0000060 ( p u r p l e , w h i t e ) 0000100 \r \n a s t i b i l e ( r e d ) using the xclip command ends up with all of those going into one blob when i paste it into a firefox editing box on a Xenforum site. > I cannot reproduce the symptom you describe in the Subject. > > I tested BOTH directions: copying from firefox and pasting with "xclip -o" > into a terminal, as well as creating an HTML page with a textarea widget, > and then pasting into that with the mouse, after "xclip -i". pasting into a terminal may work just fine. open up a blog post or something on a website and it may or may not work. in the case i was trying to get it to work, well, it didn't so i had to go look on the web and try to find out what was going on. after about an hour of looking i found a recommendation to try xsel intead and that just worked on the first try. so i thought that was worth a post here just in case in the future someone else has the same issue and goes looking and maybe they won't have to search a whole hour to get something that works. > In both cases, the pasted output retained its newlines. > > The actual HTML I used for the test: > ><html> ><title>Text area test</title> ><body> ><textarea rows="5" cols="80"></textarea> ></body> ></html> > > My terminal is urxvt (rxvt-unicode). Relevant package versions > are indicated below. > > ii firefox-esr 68.2.0esr-1~deb10u1 amd64 Mozilla Firefox web > browser - Extended Support Release (ESR) > ii rxvt-unicode 9.22-6 amd64 RXVT-like terminal > emulator with Unicode and 256-color support > ii xclip 0.13-1 amd64 command line interface to > X selections songbird