Util-Linux package development
 help / color / mirror / Atom feed
From: Benno Schulenberg <bensberg@telfort.nl>
To: util-linux@vger.kernel.org
Subject: [PATCH 05/10] terminal-colors.d: (man) reduce two tables to succinct lists
Date: Thu, 17 Apr 2025 11:48:19 +0200	[thread overview]
Message-ID: <20250417094825.20870-5-bensberg@telfort.nl> (raw)
In-Reply-To: <20250417094825.20870-1-bensberg@telfort.nl>

Before the move to asciidoctor, these tables were succinct lists in the
man page.  Change the asciidoc text to make them into lists again.

Use {nbsp} on one line to avoid weird groff behavior for \? when .ss
is defined to be zero-width (as asciidoctor does), and reshuffle two
paragraphs to avoid an asciidoctor bug that adds a spurious \fP after
a monospace span defined with double backticks.

Also, correct some markup in a few earlier paragraphs.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
 lib/terminal-colors.d.5.adoc | 103 ++++++++++++++++-------------------
 1 file changed, 48 insertions(+), 55 deletions(-)

diff --git a/lib/terminal-colors.d.5.adoc b/lib/terminal-colors.d.5.adoc
index ed8c48727..4936947b1 100644
--- a/lib/terminal-colors.d.5.adoc
+++ b/lib/terminal-colors.d.5.adoc
@@ -47,14 +47,15 @@ The user-specific _$XDG_CONFIG_HOME/terminal-colors.d_ or _$HOME/.config/termina
 == DEFAULT SCHEME FILES FORMAT
 
 The following statement is recognized:
-
 ____
-*name color-sequence*
+_name color-sequence_
 ____
 
-The *name* is a logical name of color sequence (for example "error"). The names are specific to the utilities. For more details always see the *COLORS* section in the man page for the utility.
+The _name_ is a logical name for the color sequence (for example: *error*).
+The names are specific to the utilities. For more details always see
+the *COLORS* section in the man page for the utility.
 
-The *color-sequence* is a color name, ASCII color sequences or escape sequences.
+The _color-sequence_ is a color name, ASCII color sequences, or escape sequences.
 
 === Color names
 
@@ -63,67 +64,59 @@ black, blink, blue, bold, brown, cyan, darkgray, gray, green, halfbright, lightb
 === ANSI color sequences
 
 The color sequences are composed of sequences of numbers separated by semicolons. The most common codes are:
-
 ____
-[cols=",",]
-|===
-|0 |to restore default color
-|1 |for brighter colors
-|4 |for underlined text
-|5 |for flashing text
-|30 |for black foreground
-|31 |for red foreground
-|32 |for green foreground
-|33 |for yellow (or brown) foreground
-|34 |for blue foreground
-|35 |for purple foreground
-|36 |for cyan foreground
-|37 |for white (or gray) foreground
-|40 |for black background
-|41 |for red background
-|42 |for green background
-|43 |for yellow (or brown) background
-|44 |for blue background
-|45 |for purple background
-|46 |for cyan background
-|47 |for white (or gray) background
-|===
+     0   to restore default color
+     1   for brighter colors
+     4   for underlined text
+     5   for flashing text
+    30   for black foreground
+    31   for red foreground
+    32   for green foreground
+    33   for yellow (or brown) foreground
+    34   for blue foreground
+    35   for purple foreground
+    36   for cyan foreground
+    37   for white (or gray) foreground
+    40   for black background
+    41   for red background
+    42   for green background
+    43   for yellow (or brown) background
+    44   for blue background
+    45   for purple background
+    46   for cyan background
+    47   for white (or gray) background
 ____
 
-=== Escape sequences
-
-To specify control or blank characters in the color sequences, C-style \-escaped notation can be used:
-
-____
-[cols=",",]
-|===
-|*\a* |Bell (ASCII 7)
-|*\b* |Backspace (ASCII 8)
-|*\e* |Escape (ASCII 27)
-|*\f* |Form feed (ASCII 12)
-|*\n* |Newline (ASCII 10)
-|*\r* |Carriage Return (ASCII 13)
-|*\t* |Tab (ASCII 9)
-|*\v* |Vertical Tab (ASCII 11)
-|*\?* |Delete (ASCII 127)
-|*\_* |Space
-|*\\* |Backslash (\)
-|*\^* |Caret (^)
-|*\#* |Hash mark (#)
-|===
-____
-
-Please note that escapes are necessary to enter a space, backslash, caret, or any control character anywhere in the string, as well as a hash mark as the first character.
-
 For example, to use a red background for alert messages in the output of *dmesg*(1), use:
 
+``  *echo 'alert 37;41' >> /etc/terminal-colors.d/dmesg.scheme*``
+
+=== Escape sequences
+
+An escape sequence is necessary to enter a space, backslash, caret, or any
+control character anywhere in a string, as well as a hash mark as the first
+character. These C-style backslash-escapes can be used:
+
 ____
-*echo 'alert 37;41' >> /etc/terminal-colors.d/dmesg.scheme*
+``    *\a*   Bell (ASCII 7)``
+``    *\b*   Backspace (ASCII 8)``
+``    *\e*   Escape (ASCII 27)``
+``    *\f*   Form feed (ASCII 12)``
+``    *\n*   Newline (ASCII 10)``
+``    *\r*   Carriage Return (ASCII 13)``
+``    *\t*   Tab (ASCII 9)``
+``    *\v*   Vertical Tab (ASCII 11)``
+``    *\?*{nbsp}{nbsp}{nbsp}Delete (ASCII 127)``
+``    *\_*   Space``
+``    *\\*   Backslash (\)``
+``    *\^*   Caret (^)``
+``    *\\#*   Hash mark (#)``
 ____
 
 === Comments
 
-Lines where the first non-blank character is a # (hash) are ignored. Any other use of the hash character is not interpreted as introducing a comment.
+Lines where the first non-blank character is a *#* (hash) are ignored.
+Any other use of the hash character is not interpreted as introducing a comment.
 
 == ENVIRONMENT
 
-- 
2.48.1


  parent reply	other threads:[~2025-04-17  9:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-17  9:48 [PATCH 01/10] bits: (man) normalize the markup and improve some layout Benno Schulenberg
2025-04-17  9:48 ` [PATCH 02/10] last: (man) correct the descriptions of --present and --since Benno Schulenberg
2025-04-17  9:48 ` [PATCH 03/10] last: (man) reduce an inflated table to sane proportions Benno Schulenberg
2025-04-17  9:48 ` [PATCH 04/10] rtcwake: " Benno Schulenberg
2025-04-17  9:48 ` Benno Schulenberg [this message]
2025-04-17  9:48 ` [PATCH 06/10] renice: in usage text, condense the oververbose description of option -n Benno Schulenberg
2025-04-17  9:48 ` [PATCH 07/10] renice: (man) reword several things, to be clearer, and improve some markup Benno Schulenberg
2025-04-17  9:48 ` [PATCH 08/10] lscpu: (man) don't refer to a missing section, and improve some wordings Benno Schulenberg
2025-04-17  9:48 ` [PATCH 09/10] docs: correct misspellings of "may be" and mistaken uses of "overwritten" Benno Schulenberg
2025-04-17  9:48 ` [PATCH 10/10] docs: correct mistaken uses of "overwrite" to say "override" instead Benno Schulenberg
2025-04-17  9:58 ` [PATCH 01/10] bits: (man) normalize the markup and improve some layout Robin Jarry
2025-04-24  9:57 ` Karel Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250417094825.20870-5-bensberg@telfort.nl \
    --to=bensberg@telfort.nl \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox