Approved version. Approved on: 08:20, 18 May 2022
You are viewing an old version of this page. Return to the latest version.
Difference between revisions of "Template:PC$"
[quality revision] | [quality revision] |
(Merge articles)
|
(Merge articles)
|
1 Usage[edit]
The PC$ template is used to prefix a command that must be executed on an host PC, with an host-specific prompt.
Thanks to the pc-prompt
class defined in MediaWiki:Common.css, a double (or triple) click to select the command doesn't select the prompt.
Usage: {{PC$}}
![]() |
Do not insert any space between "{{PC$}}" and the command. |
2 Basic examples[edit]
You type | You get |
---|---|
ls test command executed on the host PC
{{PC$}} ls test<br>
test1.txt test2.txt
|
ls test |
3 More examples[edit]
4 Maintenance[edit]
This template is a template common to all ST wikis.
Modifications must be done into the WikiModel. They must be reviewed by all ST wikis maintainers.
When approved, the template can be pushed/merged towards all ST wikis.
5 Code[edit]
<noinclude> ==Usage== The [[Template:PC$|PC$]] template is used '''to prefix a command that must be executed on an host PC, with an host-specific prompt'''.<br> Thanks to the <code>pc-prompt</code> class defined in [[MediaWiki:Common.css]], a double (or triple) click to select the command doesn't select the prompt. Usage: <nowiki>{{</nowiki>PC$}} {{Important | Do not insert any space between "<nowiki>{{PC$}}</nowiki>" and the command.}} ==Basic examples== {| class="st-table" ! You type !! You get |- | <code>ls test</code> command executed on the host PC<pre style="white-space: pre-wrap;"> {{PC$}} ls test<br> test1.txt test2.txt</pre> | {{PC$}} ls test<br> test1.txt test2.txt |} ==More examples== {| class="st-table" ! You type !! You get |- | 2 commands executed on the host PC and preformatted text block (space at the beginning of each line)<pre style="white-space: pre-wrap;"> {{PC$}} ls test test1.txt test2.txt {{PC$}} cat test/test1.txt This is a test</pre> | {{PC$}} ls test test1.txt test2.txt {{PC$}} cat test/test1.txt This is a test |- | Command executed on the host PC and preformatted text block (space at the beginning of each line)<pre style="white-space: pre-wrap;"> {{PC$}} ls test test1.txt test2.txt</pre> | {{PC$}} ls test test1.txt test2.txt |- | Long command executed on the host PC and preformatted text block (space at the beginning of each line)<pre style="white-space: pre-wrap;"> {{PC$}} this is a so long command executed on the host PC that a horizontal scrolling bar is needed</pre> | style="max-width:30em;" | {{PC$}} this is a so long command executed on the host PC that a horizontal scrolling bar is needed |} - | Template used within another public message box template<pre style="white-space: pre-wrap;"> {{Info | Message before the command {{PC$}}ls test test1.txt test2.txt Message after the command }}</pre> | {{Info | Message before the command {{PC$}}ls test test1.txt test2.txt Message after the command }} |- | Template used within another protected message box template<pre style="white-space: pre-wrap;"> {{InternalInfo | Message before the command {{PC$}}ls test test1.txt test2.txt Message after the command }}</pre> | {{InternalInfo | Message before the command {{PC$}}ls test test1.txt test2.txt Message after the command }} |} ==Maintenance== This template is a template common to all ST wikis. <br> Modifications must be done into the [[stwikimodel:Template:PC$|WikiModel]]. They must be reviewed by all ST wikis maintainers.<br> When approved, the template can be pushed/merged towards all ST wikis. ==Code==</noinclude><span class={{=}}"pc-prompt"></span>
(One intermediate revision by the same user not shown) | |||
Line 5: | Line 5: | ||
Usage: <nowiki>{{</nowiki>PC$}} |
Usage: <nowiki>{{</nowiki>PC$}} |
||
+ | |||
+ | {{Important | Do not insert any space between "<nowiki>{{PC$}}</nowiki>" and the command.}} |
||
==Basic examples== |
==Basic examples== |
||
Line 12: | Line 14: | ||
| <code>ls test</code> command executed on the host PC |
| <code>ls test</code> command executed on the host PC |
||
<pre style="white-space: pre-wrap;"> |
<pre style="white-space: pre-wrap;"> |
||
− | {{PC$}} ls test<br> |
+ | {{PC$}}ls test<br> |
test1.txt test2.txt |
test1.txt test2.txt |
||
</pre> |
</pre> |
||
| |
| |
||
− | {{PC$}} ls test<br> |
+ | {{PC$}}ls test<br> |
test1.txt test2.txt |
test1.txt test2.txt |
||
|} |
|} |
||
Line 26: | Line 28: | ||
| 2 commands executed on the host PC and preformatted text block (space at the beginning of each line) |
| 2 commands executed on the host PC and preformatted text block (space at the beginning of each line) |
||
<pre style="white-space: pre-wrap;"> |
<pre style="white-space: pre-wrap;"> |
||
− | {{PC$}} ls test |
+ | {{PC$}}ls test |
test1.txt test2.txt |
test1.txt test2.txt |
||
− | {{PC$}} cat test/test1.txt |
+ | {{PC$}}cat test/test1.txt |
This is a test |
This is a test |
||
</pre> |
</pre> |
||
| |
| |
||
− | {{PC$}} ls test |
+ | {{PC$}}ls test |
test1.txt test2.txt |
test1.txt test2.txt |
||
− | {{PC$}} cat test/test1.txt |
+ | {{PC$}}cat test/test1.txt |
This is a test |
This is a test |
||
|- |
|- |
||
| Command executed on the host PC and preformatted text block (space at the beginning of each line) |
| Command executed on the host PC and preformatted text block (space at the beginning of each line) |
||
<pre style="white-space: pre-wrap;"> |
<pre style="white-space: pre-wrap;"> |
||
− | {{PC$}} ls test |
+ | {{PC$}}ls test |
test1.txt test2.txt |
test1.txt test2.txt |
||
</pre> |
</pre> |
||
| |
| |
||
− | {{PC$}} ls test |
+ | {{PC$}}ls test |
test1.txt test2.txt |
test1.txt test2.txt |
||
|- |
|- |
||
| Long command executed on the host PC and preformatted text block (space at the beginning of each line) |
| Long command executed on the host PC and preformatted text block (space at the beginning of each line) |
||
<pre style="white-space: pre-wrap;"> |
<pre style="white-space: pre-wrap;"> |
||
− | {{PC$}} this is a so long command executed on the host PC that a horizontal scrolling bar is needed |
+ | {{PC$}}this is a so long command executed on the host PC that a horizontal scrolling bar is needed |
</pre> |
</pre> |
||
| style="max-width:30em;" | |
| style="max-width:30em;" | |
||
− | {{PC$}} this is a so long command executed on the host PC that a horizontal scrolling bar is needed |
+ | {{PC$}}this is a so long command executed on the host PC that a horizontal scrolling bar is needed |
+ | |- |
||
+ | | Template used within another public message box template |
||
+ | <pre style="white-space: pre-wrap;"> |
||
+ | {{Info | |
||
+ | Message before the command |
||
+ | {{PC$}}ls test |
||
+ | test1.txt test2.txt |
||
+ | Message after the command |
||
+ | }} |
||
+ | </pre> |
||
+ | | |
||
+ | {{Info | |
||
+ | Message before the command |
||
+ | {{PC$}}ls test |
||
+ | test1.txt test2.txt |
||
+ | Message after the command |
||
+ | }} |
||
+ | |- |
||
+ | | Template used within another protected message box template |
||
+ | <pre style="white-space: pre-wrap;"> |
||
+ | {{InternalInfo | |
||
+ | Message before the command |
||
+ | {{PC$}}ls test |
||
+ | test1.txt test2.txt |
||
+ | Message after the command |
||
+ | }} |
||
+ | </pre> |
||
+ | | |
||
+ | {{InternalInfo | |
||
+ | Message before the command |
||
+ | {{PC$}}ls test |
||
+ | test1.txt test2.txt |
||
+ | Message after the command |
||
+ | }} |
||
|} |
|} |
||
Line 60: | Line 96: | ||
==Code== |
==Code== |
||
− | </noinclude><span class="pc-prompt"></span> |
+ | </noinclude><span class{{=}}"pc-prompt"></span> |