Skip to content

how to duplicate the color in shellsession? #3301

Answered by RunDevelopment
simkimsia asked this question in Q&A
Discussion options

You must be logged in to vote

The problem with terminal output is that it doesn't follow any structure. Any program can output anything it wants, so there is nothing for Prism to highlight. Sure, we as clever humans can see some structure, but it's still very much unstructured text. The only reason you get some color in the terminal is that the program does the highlighting itself.

The easiest solution might be to manually highlight those parts. You can use Keep Markup to keep existing markup.

<pre class="command-line lang-shellsession" data-user="alice" data-host="localhost"
  data-output="2-5"><code>docker-compose -f local.yml up
<span class="special-class">web_1  |</span> Going to use psycopg2 to connect to postgres
<

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@simkimsia
Comment options

@RunDevelopment
Comment options

@simkimsia
Comment options

@RunDevelopment
Comment options

@simkimsia
Comment options

Answer selected by simkimsia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants