Template:Cmd: Difference between revisions

From base48
imported>Rmarko
m (Fix)
imported>Rmarko
m (code note)
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:
Helper template for rendering command line commands.
Helper template for rendering command line commands.


Usage: <nowiki>{{Cmd|command}}</nowiki>.  
Usage: <nowiki>{{cmd|git clone test.repo}}</nowiki> (defaults to bash). Different lang: <nowiki>{{cmd|lang=cpp|code=x ^= 1337</nowiki>.
 
If using special characters and not getting any result <nowiki>code=</nowiki> is required: <nowiki>{{cmd|code=a=2*b&c}}</nowiki>
 
* [https://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi#Supported_languages supported lang(s)]
</noinclude>
</noinclude>
<div class="b48mw_cmd">
<div class="b48mw-cmd">
{{#tag:syntaxhighlight|{{{code|{{{1}}}}}}|lang="{{{lang|{{{2|bash}}}}}}"}}
{{#tag:syntaxhighlight|{{{code|{{{1}}}}}}|lang="{{{lang|{{{2|bash}}}}}}"}}
</div>
</div>

Latest revision as of 01:07, 15 July 2015

Helper template for rendering command line commands.

Usage: {{cmd|git clone test.repo}} (defaults to bash). Different lang: {{cmd|lang=cpp|code=x ^= 1337.

If using special characters and not getting any result code= is required: {{cmd|code=a=2*b&c}}

<syntaxhighlight lang="bash">{{{1}}}</syntaxhighlight>