Welcome!

The kernel problem with recent updates has been solved. Find the solution here

Important information
-- Required MX 15/16 Repository Changes
-- Information on torrent hosting changes
-- Information on MX15/16 GPG Keys
-- Spectre and Meltdown vulnerabilities

News
-- Introducing our new Website
-- MX Linux on social media: here

Current releases
-- MX-18.3 Point Release release info here
-- Migration Information to MX-18 here
-- antiX-17.4.1 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

forum Quote text and Code display

If you are having a problem with logging into the site or with registering, then post under this forum to try to get help, or just use the "contact us" link at the bottom of the page to notify the Site Administrators.
User avatar
tradonal
Forum Novice
Forum  Novice
Posts: 83
Joined: Mon Sep 25, 2017 11:43 am

forum Quote text and Code display

#1

Post by tradonal » Thu Jun 14, 2018 3:26 pm

Hello all,
It's just to know which method to use for the output of a command on the forum :p

like this:

Code: Select all

$ apt search linux-* 3.16.0-6-586
En train de trier... Fait
Recherche en texte intégral... Fait
linux-headers-3.16.0-6-586/oldstable 3.16.56-1+deb8u1 i386
Header files for Linux 3.16.0-6-586

linux-image-3.16.0-6-586/oldstable,now 3.16.56-1+deb8u1 i386 [installé]
Linux 3.16 for older PCs
or like that

Code: Select all

$ apt search linux-* 3.16.0-6-586
En train de trier... Fait
Recherche en texte intégral... Fait
linux-headers-3.16.0-6-586/oldstable 3.16.56-1+deb8u1 i386
  Header files for Linux 3.16.0-6-586

linux-image-3.16.0-6-586/oldstable,now 3.16.56-1+deb8u1 i386  [installé]
  Linux 3.16 for older PCs
THX

User avatar
Eadwine Rose
Administrator
Posts: 9352
Joined: Wed Jul 12, 2006 2:10 am

Re: forum Quote text and Code display

#2

Post by Eadwine Rose » Thu Jun 14, 2018 3:26 pm

The code one :) Sometimes outputs can run quite lengthy, code leaves formatting of the command as is, and makes a nice scroll bar on longer entries.
MX-18.3_x64 May 26 2019 * 4.19.0-5-amd64 ext4 Xfce 4.12.3 * 8-core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 390.116 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 860EVO * Samsung S24D330 & P2250 * HP Envy5030

User avatar
fehlix
Developer
Posts: 4882
Joined: Wed Apr 11, 2018 5:09 pm

Re: forum Quote text and Code display

#3

Post by fehlix » Thu Jun 14, 2018 3:57 pm

Please do use code-tags ( the icon above the editor window </>) and paste between
the code-tags [code] paste output here[/code].
For short quotes is probably ok to use quote-tags ( quote-icon above editor window " and paste between [quote] paste quotes here [/quote].
Hint: When you mark text and press the tag-icon above the editor the text goes into the tags.
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
tradonal
Forum Novice
Forum  Novice
Posts: 83
Joined: Mon Sep 25, 2017 11:43 am

Re: forum Quote text and Code display

#4

Post by tradonal » Sat Jun 16, 2018 11:43 am

;)
Thank you for your return, if I understand correctly there is no well defined rule for that ...
if not, is it possible to color, if so how?
For example,
For have this
Image

Code: Select all

# ls
#.bash_history#  directory.txt  geany-themes  LGPL     packaging           RESULTS1.txt  Téléchargements
Bureau           Documents      Images        Modèles  Public              RESULTS2.txt  usr
Desktop          dwhelper       infogrub.txt  Musique  recherches emplois  RESULTS.txt   Vidéos
thank you

User avatar
fehlix
Developer
Posts: 4882
Joined: Wed Apr 11, 2018 5:09 pm

Re: forum Quote text and Code display

#5

Post by fehlix » Sat Jun 16, 2018 11:53 am

tradonal wrote:
Sat Jun 16, 2018 11:43 am
;)
Thank you for your return, if I understand correctly there is no well defined rule for that ...
if not, is it possible to color, if so how?
Well, it is a polite moderator request, and in this sense it is well spelled out. :happy:

In addition, do please consult the FAQ above,
esp. Can I use HTML?
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
tradonal
Forum Novice
Forum  Novice
Posts: 83
Joined: Mon Sep 25, 2017 11:43 am

Re: forum Quote text and Code display

#6

Post by tradonal » Sun Jun 17, 2018 4:09 pm

fehlix wrote:
Sat Jun 16, 2018 11:53 am
tradonal wrote:
Sat Jun 16, 2018 11:43 am
;)
Thank you for your return, if I understand correctly there is no well defined rule for that ...
if not, is it possible to color, if so how?
Well, it is a polite moderator request, and in this sense it is well spelled out. :happy:

In addition, do please consult the FAQ above,
esp. Can I use HTML?
;)
yes, I knew for the html
But it is possible to color bbcode, but this is not easy to do ...
for example, is it possible to redirect the output of a command to bbcode .... for html I use ccze ... ??

Image
with this https://www.stuffbydavid.com/textcolorizer it's not top ....
root@mx1:~
# ls
#.bash_history# Documents infogrub.txt Modèles recherches emplois systemctlperso
Bureau dwhelper iwlistperso Musique RESULTS1.txt Téléchargements
Desktop geany-themes LGPL packaging RESULTS2.txt usr
directory.txt Images lshw.html Public RESULTS.txt Vidéos

thank you

User avatar
fehlix
Developer
Posts: 4882
Joined: Wed Apr 11, 2018 5:09 pm

Re: forum Quote text and Code display

#7

Post by fehlix » Sun Jun 17, 2018 4:31 pm

You mean like this bbcolor code:
Hello world!

Seems to work.
Thank you for this info.
Quoted:
Hello world!
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
cyrilus31
Forum Regular
Forum Regular
Posts: 784
Joined: Thu Nov 03, 2016 3:24 pm

Re: forum Quote text and Code display

#8

Post by cyrilus31 » Mon Jun 18, 2018 3:17 am

C'est psychédélique.
I think it's bearable (and even funny) once in a while but too often and you get a big headache :frustrated:

User avatar
tradonal
Forum Novice
Forum  Novice
Posts: 83
Joined: Mon Sep 25, 2017 11:43 am

Re: forum Quote text and Code display

#9

Post by tradonal » Thu Jun 21, 2018 12:59 pm

fehlix wrote:
Sun Jun 17, 2018 4:31 pm
You mean like this bbcolor code:
Hello world!

Seems to work.
Thank you for this info.
Quoted:
Hello world!

cyrilus31 wrote:
Mon Jun 18, 2018 3:17 am
C'est psychédélique.
I think it's bearable (and even funny) once in a while but too often and you get a big headache :frustrated:
;)

yes and this is not the goal, but just a parenthesis .... :hitmyhead:
-) for color, I was thinking of something like this, which does not work on MX forum ...
source of the example: https://www.debian-fr.org/c/support
-) With code
</code></pre>
<pre><code class="lang-auto">$ cat /isos/00_isoboot.cfg

</code></pre>
<pre><code class="lang-auto">menuentry "bl-Deuterium-i386 install" {
set root='hd0,msdos1'
set isofile="/isos/bl-Deuterium-i386+NonPAE_20170429.iso"
loopback loop (hd0,msdos1)$isofile
linux (loop)/install/gtk/vmlinuz findiso=${isofile} video=vesa:ywrap,mtrr vga=788 -- quiet
initrd (loop)/install/gtk/initrd.gz
}</code></pre>
-) we get a color output like this
Image

;)

User avatar
Eadwine Rose
Administrator
Posts: 9352
Joined: Wed Jul 12, 2006 2:10 am

Re: forum Quote text and Code display

#10

Post by Eadwine Rose » Thu Jun 21, 2018 3:58 pm

I'd kindly request leaving the colors out of posts, it's easier to read when posts are in plain jane text. Thanks :)
MX-18.3_x64 May 26 2019 * 4.19.0-5-amd64 ext4 Xfce 4.12.3 * 8-core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 390.116 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 860EVO * Samsung S24D330 & P2250 * HP Envy5030

Post Reply

Return to “Site Help”