Template:RootInvocation

From Gentoo Wiki
Jump to:navigation Jump to:search
[edit

Documentation

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 display an administrative command's invocation options, e.g. the output of <command> --help or <command> -h.

See also {{Invocation}}, Gentoo_Wiki:Guidelines#Block-level_layout_elements.

Parameters

Unnamed parameter (only 1 accepted)
Add a command. Repalce {{=}} or {{!}} instead of the characters "=" or "|" for inline references to "=" 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 {{RootInvocation|command -h}}

Main version
root #command -h
Sandbox version
root #command -h
Parameter: unnamed with the special characters "=" and "|"
Wiki code {{RootInvocation|command with help{{=}}true and help{{!}}false}}

Main version false
Sandbox version false
Parameter: output
Wiki code {{RootInvocation|command -h|output=<pre> Some output </pre>}}

Main version
root #command -h
Some output
More output
Even more output
Sandbox version
root #command -h
Some output
More output
Even more output
Parameter: prompt, color
Wiki code {{RootInvocation |command -h |prompt=example ? |color=lightblue }}

Main version
example ?command -h
Sandbox version
example ?command -h
Parameter: unnamed (1x)
Wiki code {{RootInvocation |command 1 -h }}

Main version
root #command 1 -h
Sandbox version
root #command 1 -h
Parameter: unnamed (2x)
Wiki code {{RootInvocation |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

  • {{Invocation}} – Template for a user (non-root) invocation of a command.
  • {{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.
Note
The above documentation is transcluded from Template:RootInvocation/doc. (edit | history)
Editors can experiment in this template's sandbox (edit) and testcases (edit) pages.
Please add categories and interwikis to the /doc subpage. (See the subpages of this template.)