Difference between revisions of "Template:Cmd/doc"
From stoney cloud
m (Rework) |
m (Add hint for {{=}} and {{!}}) |
||
Line 3: | Line 3: | ||
== Parameters == | == Parameters == | ||
− | ; Unnamed parameters (up to 10): Add commands. | + | ; Unnamed parameters (up to 10): Add commands. Use {{Tl|1==}} or {{Tl|!}} instead of the characters "=" or "|". |
; prompt (optional): Change the command prompt (default: '''user $'''). | ; prompt (optional): Change the command prompt (default: '''user $'''). | ||
; color (optional): Change the prompt color (default: some green). | ; color (optional): Change the prompt color (default: some green). |
Revision as of 08:00, 11 December 2012
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, fixes or 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 | ||
| ||
Sandbox version |
Parameter: unnamed with the special characters "=" and "|" | ||
---|---|---|
Wiki code | {{Cmd|a command with {{=}} and {{!}}}} | |
| ||
Main version | ||
| ||
Sandbox version |
Parameter: output | ||
---|---|---|
Wiki code | {{Cmd|a command|output=<pre> Some output </pre>}} | |
| ||
Main version | ||
| ||
Sandbox version |
Parameter: prompt, color | ||
---|---|---|
Wiki code | {{Cmd |a command |prompt=example ? |color=blue }} | |
| ||
Main version | ||
| ||
Sandbox version |
Parameter: unnamed (10x) | ||
---|---|---|
Wiki code | {{Cmd |1. command |... |10. command }} </pre> | |
| ||
Main version | ||
| ||
Sandbox version |