Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Hi fellows,

i know, this is not a perl question, but because i'm sure that perlmonks knowledge reaches beyond the frontiers of pure perl i'll put it here.

Does anybody know how it can be done that color-informations within a text-selection in a xterm-session can be preserved. If i select f.i. the colored output of a "ls -al --color=tty" i only get the uncolored text with a CutAndPaste-action but I would like to have the text AND the color-infos in a way you can see here:

drwxrwx---+ 9 tos Benutzer 0 Mar 25 2009 ESC[00;34m.ESC[00m drwxrwx---+ 69 tos Benutzer 0 May 8 2009 ESC[00;34m..ESC[00m -rwxr-x---+ 1 tos Benutzer 2743 Oct 26 2008 ESC[00;31mAuErrorDBESC[ +00m -rwxr-x---+ 1 tos Benutzer 1736 Jan 29 2009 ESC[00;31mXcms.txtESC[0 +0m drwxrwx---+ 2 tos Benutzer 0 Jan 6 2009 ESC[00;34mxsmESC[00m
Any suggestion or hints would be appreciated.
~*~ /@\ /%;@\ o/@,%\o /%;`@,\ hjw '^^^H^^^`

Merry Christmas and Happy New Year,


Is simplicity best or simply the easiest Martin L. Gore

In reply to preserve color-infos in a xterm-selection by tos

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others pondering the Monastery: (4)
    As of 2021-03-07 17:40 GMT
    Find Nodes?
      Voting Booth?
      My favorite kind of desktop background is:

      Results (122 votes). Check out past polls.