GeSHi Syntax Highlighting in Mediawiki for command line

855 views Asked by At

Does the Mediawiki extension SyntaxHighlight GeSHi come with highlighting support for bash/ash/sh, for example by coloring program arguments, strings and numbers or emphasizing commands? Example (this is SO highlighting for bash):

user@host ~/test $ ls "abc"
abc

Or is there some (generic) language definition which covers some of it?

1

There are 1 answers

0
Nemo On BEST ANSWER

Yes.

<syntaxhighlight lang="bash">
user@host ~/test $ ls "abc"
abc
</syntaxhighlight>

gives:

<pre>
user@host ~/test <span class="nv">$ </span>ls <span class="s2">"abc"</span>
abc
</pre>

Current display of the above output in my browser

Note that the highlighter changed in recent versions of the extension.