Difference between revisions of "Template:RootCmd/doc"

From stoney cloud
Jump to: navigation, search
m (moved Template:ShellRoot/doc to Template:RootCmd/doc: See Template talk:Shell#Name. More discussion on IRC.)
(Updated)
Line 2: Line 2:
  
 
== Usage ==
 
== Usage ==
Add this code to the page text:
+
For one command add this code to the page text:
 
<pre>
 
<pre>
{{ShellRoot|a root command}}
+
{{RootCmd|a command}}
 
</pre>
 
</pre>
{{ShellRoot|a root command}}
+
{{RootCmd|a command}}
 +
 
 +
 
 +
One command with output:
 +
<pre>
 +
{{RootCmd|a command
 +
|output=Some output}}
 +
</pre>
 +
{{RootCmd|a command
 +
|output=Some output}}
 +
{{Note|''output'' - as a named parameter - is optional and can additional be used in the following examples. This is also true for all following named parameters.}}
 +
 
 +
 
 +
One command with user defined prompt and color:
 +
<pre>
 +
{{RootCmd|a command
 +
|prompt=example ?
 +
|color=blue}}
 +
</pre>
 +
{{RootCmd|a command
 +
|prompt=example ?
 +
|color=blue}}
 +
 
 +
 
 +
Up to five commands:
 +
<pre>
 +
{{RootCmd|1. command
 +
|2. command
 +
|3. command
 +
|4. command
 +
|5. command
 +
}}
 +
</pre>
 +
{{RootCmd|1. command
 +
|2. command
 +
|3. command
 +
|4. command
 +
|5. command
 +
}}
  
 
<includeonly>[[Category:Templates]]</includeonly>
 
<includeonly>[[Category:Templates]]</includeonly>

Revision as of 12:34, 29 September 2011

Use this template to show a shell box with a root command.

Usage

For one command add this code to the page text:

{{RootCmd|a command}}
root # a command


One command with output:

{{RootCmd|a command
|output=Some output}}
root # a command
Some output
Note
output - as a named parameter - is optional and can additional be used in the following examples. This is also true for all following named parameters.


One command with user defined prompt and color:

{{RootCmd|a command
|prompt=example ?
|color=blue}}
example ? a command


Up to five commands:

{{RootCmd|1. command
|2. command
|3. command
|4. command
|5. command
}}
root # 1. command
root #
2. command
root #
3. command
root #
4. command
root #
5. command