The ConsoleOutput MediaWiki extension was created by Daniel Robbins to provide highlighting of user input for interactive terminal session blocks. To use it, surround user input with <tt>&lt;console&gt;</tt> opening and closing tags, and put a <tt>##i##</tt> input code immediately before user input on each line. This will cause all text from the <tt>##i##</tt> point to the end of the line to be in a darker color. The rest of the text will be in a lighter grey, allowing it to be distinguished more easily from user input. Here are other sequences that can be used:

Revision as of 01:05, January 12, 2015

The ConsoleOutput MediaWiki extension was created by Daniel Robbins to provide highlighting of user input for interactive terminal session blocks. To use it, surround user input with <console> opening and closing tags, and put a ##i## input code immediately before user input on each line. This will cause all text from the ##i## point to the end of the line to be in a darker color. The rest of the text will be in a lighter grey, allowing it to be distinguished more easily from user input. Here are other sequences that can be used:

##b## - highlight the rest of the line in bold.

##b## text here ##!b## - highlight the text between both markers in bold.

##i## text here ##!i## - highlight the text between both markers in a darker color.

This extension can be further extended to add color support, as desired, and some of the CSS for color support can already be found in the code below.

Here are a few examples of the ConsoleOutput extension. First this is how you might typically display ls output, with a particular directory highlighted: