From: Benno Schulenberg <bensberg@telfort.nl>
To: util-linux@vger.kernel.org
Subject: [PATCH] terminal-colors.d: (man) do not show 'type' as an optional part
Date: Sun, 1 Mar 2026 17:45:05 +0100 [thread overview]
Message-ID: <20260301164505.24409-1-bensberg@telfort.nl> (raw)
That is: remove the square brackets from around 'type' in the synopsis.
Also, do not give the impression that a leading dot by itself is fine
before the 'type'. That is: a dot is required only when 'name' and/or
'@term' is present.
Also, do not colorize the square brackets as if they were part of the
placeholders. (And use ++double plus++ passthroughs for the opening
square brackets, to prevent asciidoctor from misinterpreting them.)
Indent the list of file types, for clarity.
And correct or improve some wordings, and remove an inconvenient
blank line in an example.
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
lib/terminal-colors.d.5.adoc | 24 ++++++++++--------------
1 file changed, 10 insertions(+), 14 deletions(-)
diff --git a/lib/terminal-colors.d.5.adoc b/lib/terminal-colors.d.5.adoc
index 40ed8b966..9704fe413 100644
--- a/lib/terminal-colors.d.5.adoc
+++ b/lib/terminal-colors.d.5.adoc
@@ -21,7 +21,7 @@ terminal-colors.d - configure output colorization for various utilities
== SYNOPSIS
-/etc/terminal-colors.d/_[[name][@term].][type]_
+*/etc/terminal-colors.d/*++[++_name_**.**|++[++_name_]**@**_term_**.**]_type_
== DESCRIPTION
@@ -32,14 +32,14 @@ The _name_ is a utility name. The name is optional and when none is specified th
The _term_ is a terminal identifier (the *TERM* environment variable). The terminal identifier is optional and when none is specified then the file is used for all unspecified terminals.
The _type_ is a file type. Supported file types are:
-
+____
*disable*::
Turns off output colorization for all compatible utilities. See also the NO_COLOR environment variable below.
*enable*::
Turns on output colorization; any matching *disable* files are ignored.
-
*scheme*::
Specifies colors used for output. The file format may be specific to the utility, the default format is described below.
+____
If there are more files that match for a utility, then the file with the more specific filename wins. For example, the filename "@xterm.scheme" has less priority than "dmesg@xterm.scheme". The lowest priority are those files without a utility name and terminal identifier (e.g., "disable").
@@ -56,15 +56,15 @@ 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_ can be a color name, an ANSI color sequence, or an escape sequence.
=== Color names
-black, blink, blue, bold, brown, cyan, darkgray, gray, green, halfbright, lightblue, lightcyan, lightgray, lightgreen, lightmagenta, lightred, magenta, red, reset, reverse, and yellow.
+Valid color names are: black, blink, blue, bold, brown, cyan, darkgray, gray, green, halfbright, lightblue, lightcyan, lightgray, lightgreen, lightmagenta, lightred, magenta, red, reset, reverse, and yellow.
=== ANSI color sequences
-The color sequences are composed of sequences of numbers separated by semicolons. The most common codes are:
+An ANSI color sequence is composed of sequences of numbers separated by semicolons. The most common codes are:
____
0 to restore default color
1 for brighter colors
@@ -94,7 +94,7 @@ For example, to use a red background for alert messages in the output of *dmesg*
=== Escape sequences
-An escape sequence is necessary to enter a space, backslash, caret, or any
+An escape sequence is needed 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:
@@ -137,31 +137,27 @@ _$HOME/.config/terminal-colors.d_
_/etc/terminal-colors.d_
-== EXAMPLE
+== EXAMPLES
Disable colors for all compatible utilities:
-
____
*touch /etc/terminal-colors.d/disable*
____
Disable colors for all compatible utils on a vt100 terminal:
-
____
*touch /etc/terminal-colors.d/@vt100.disable*
____
Disable colors for all compatible utils except *dmesg*(1):
-
____
-*touch /etc/terminal-colors.d/disable*
-
+*touch /etc/terminal-colors.d/disable* +
*touch /etc/terminal-colors.d/dmesg.enable*
____
== COMPATIBILITY
-The *terminal-colors.d* functionality is currently supported by all util-linux utilities which provides colorized output. For more details always see the *COLORS* section in the man page for the utility.
+The *terminal-colors.d* functionality is currently supported by all util-linux utilities which provide colorized output. For more details always see the *COLORS* section in the man page for the utility.
include::man-common/bugreports.adoc[]
--
2.53.0
next prev reply other threads:[~2026-03-01 16:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-28 11:52 [PATCH] findfs: (man) improve the markup, the layout, and the wording Benno Schulenberg
2026-02-28 13:03 ` Nuno Silva
2026-03-01 11:25 ` Benno Schulenberg
2026-03-01 11:56 ` Nuno Silva
2026-03-01 16:45 ` Benno Schulenberg [this message]
2026-03-09 10:51 ` Karel Zak
2026-03-09 16:08 ` improvements to terminal-colors.d.5.adoc were undone Benno Schulenberg
2026-03-10 18:49 ` Karel Zak
2026-03-12 15:34 ` Benno Schulenberg
2026-03-11 11:40 ` 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=20260301164505.24409-1-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