This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.
Please visit our production wiki at https://wiki.gentoo.org
Template:Invocation/doc
From Gentoo Wiki (test)
Jump to:navigation
Jump to:search
Note
This page is a template. It contains some standardized, often used text, which can be transcluded inside other pages.
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
- Anonymous parameter (only 1 accepted)
- Add a command. Use
{{=}}
or{{!}}
instead of the characters "=" or "|" for inline references. - 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:
CollapseParameter: 1. unnamed | |
---|---|
Wiki code | {{Invocation|command -h}}
|
Main version | user $ command -h |
Sandbox version | user $ command -h |
CollapseParameter: unnamed with the special characters "=" and "|" | |
---|---|
Wiki code | {{Invocation|command with help{{=}}true and help{{!}}false}}
|
Main version | falseExpand |
Sandbox version | falseExpand |
CollapseParameter: output | |
---|---|
Wiki code | {{Invocation|command -h|output=<pre>
Some output
</pre>}}
|
Main version | user $ command -h |
Sandbox version | user $ command -h |
CollapseParameter: prompt, color | |
---|---|
Wiki code | {{Invocation
|command -h
|prompt=example ?
|color=lightblue
}}
|
Main version | example ? command -h
|
Sandbox version | example ? command -h
|
CollapseParameter: unnamed (1x) | |
---|---|
Wiki code | {{Invocation
|command 1 -h
}}
|
Main version | user $ command 1 -h
|
Sandbox version | user $ command 1 -h
|
CollapseParameter: unnamed (2x) | |
---|---|
Wiki code | {{Invocation
|command 1 -h
|command 2 -h
}}
|
Main version | {{Cmd template error}} Parameter 2 not defined. For correct usage see Cmd template's documentation on the 2 parameter. |
Sandbox version | {{Cmd template error}} Parameter 2 not defined. For correct usage see Cmd template's documentation on the 2 parameter. |
See also
- {{Cmd}} – Template for a user prompt.
- {{RootCmd}} – Template for a root prompt.
- {{GenericCmd}} – White on a dark background.
- {{Emerge}} – Quickly create an emerge style prompt by inputting the package name.
- {{Unmerge}} – Quickly create an unmerge style prompt by inputting the package name.