Manjaro Difference between revisions of "Template:UserCmdOutput"

Difference between revisions of "Template:UserCmdOutput"

Template page
(update template info)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
'''<nowiki>{{UserCmdOutput|command=command|result=result}}</nowiki>'''
 
{{CommandOutputTemplate|color=green|bgcolor=white|prompt=$|command=lsblk|result=result}}
== UserCmdOutput template ==
</noinclude><includeonly>{{CommandOutputTemplate|color=green|bgcolor=white|prompt=$|command={{{command}}}|result={{{result}}}}}</includeonly>
<p>Template formatting a command entered as user including the resulting output</p>
<p>The result is often more than one line.</p>
<p>To format the result correctly use a set of '''<nowiki><pre>result</pre></nowiki>''' tags to ensure the result is displayed with multiple lines.</p>
<p>
Syntax: '''<nowiki>{{UserCmdOutput|command=command|result=<pre>result</pre>}}</nowiki>'''
{{CommandOutputTemplate|ps1=$|ps1fg=green|clifg=black|clibg=lightgrey|command=lsblk|result=<pre>nvme0n1    259:0    0 476,9G  0 disk
├─nvme0n1p1 259:1    0  300M  0 part /boot/efi
├─nvme0n1p2 259:2    0 467,8G  0 part /
└─nvme0n1p3 259:3    0  8,8G  0 part [SWAP]
</pre>}}
</p>
</noinclude>
<includeonly>{{CommandOutputTemplate|ps1=$|ps1fg=green|clifg=black|clibg=lightgrey|command={{{command}}}|result={{{result}}}}}</includeonly>

Latest revision as of 09:29, 9 December 2022


UserCmdOutput template

Template formatting a command entered as user including the resulting output

The result is often more than one line.

To format the result correctly use a set of <pre>result</pre> tags to ensure the result is displayed with multiple lines.

Syntax: {{UserCmdOutput|command=command|result=<pre>result</pre>}}

$ lsblk

nvme0n1     259:0    0 476,9G  0 disk 
├─nvme0n1p1 259:1    0   300M  0 part /boot/efi
├─nvme0n1p2 259:2    0 467,8G  0 part /
└─nvme0n1p3 259:3    0   8,8G  0 part [SWAP]


Cookies help us deliver our services. By using our services, you agree to our use of cookies.