Template:Cmd/doc: Difference between revisions

From HPC Wiki
Jump to:navigation Jump to:search
m (Protected "Template:Cmd/doc" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
No edit summary
Line 23: Line 23:
<includeonly>
<includeonly>
[[Category:Formatting templates]]
[[Category:Formatting templates]]
</includeonly>
</includeonly>
<noinclude>
<noinclude>
[[Category:Template documentation]]
[[Category:Template documentation]]
</noinclude>
</noinclude>

Revision as of 20:01, 25 December 2016

Note
This page is a template. It contains some standardized, often used text, which can be transcluded inside other pages.

As this template is widely used in our wiki, it may be protected in which case only staff members can change it. Use the discussion page to propose enhancements or fixes, or to voice your opinion.

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

Parameters

Unnamed parameters (up to 10)
Add commands. Use {{=}} or {{!}} instead of the characters "=" or "|".
prompt (optional)
Change the command prompt (default: user $).
color (optional)
Change the prompt color (default: some green).
output (optional)
Add the command's output.

Usage

See the template's testcases:


Parameter: 1. unnamed
Wiki code {{Cmd|a command}}

Main version
user $a command
Sandbox version
Parameter: unnamed with the special characters "=" and "|"
Wiki code {{Cmd|a command with {{=}} and {{!}}}}

Main version
user $a command with = and |
Sandbox version
Parameter: output
Wiki code {{Cmd|a command|output=<pre> Some output </pre>}}

Main version
user $a command
Some output
Sandbox version
Parameter: prompt, color
Wiki code {{Cmd |a command |prompt=example ? |color=blue }}

Main version
example ?a command
Sandbox version
Parameter: unnamed (10x)
Wiki code {{Cmd |1. command |... |10. command }}

Main version
user $1. command
user $2. command
user $3. command
user $4. command
user $5. command
user $6. command
user $7. command
user $8. command
user $9. command
user $10. command
Sandbox version


See also