Template:RootInvocation

From Gentoo Wiki
Jump to: navigation, 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 show a shell box with a root command.

Parameters

Unnamed 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:


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
root #command help=true and help|false
Sandbox version
root #command help=true and help|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}}
Parameter 2 not defined. For correct usage see template's documention.
Sandbox version
{{Cmd}}
Parameter 2 not defined. For correct usage see template's documention.

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.)