]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
man-pages: consolidate COLORS section
authorKarel Zak <kzak@redhat.com>
Wed, 9 Feb 2022 10:56:36 +0000 (11:56 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 9 Feb 2022 10:59:17 +0000 (11:59 +0100)
* use man-common/colors.adoc include file

* improve description and add example how to disable colors globally
  or for specific tool

Addresses: https://github.com/util-linux/util-linux/issues/1593
Signed-off-by: Karel Zak <kzak@redhat.com>
disk-utils/cfdisk.8.adoc
disk-utils/fdisk.8.adoc
disk-utils/sfdisk.8.adoc
man-common/colors.adoc [new file with mode: 0644]
misc-utils/cal.1.adoc
sys-utils/dmesg.1.adoc
text-utils/hexdump.1.adoc

index 59fb80269cde459a5f578f3a813cdabe030c3ea4..9e2b2663aa48c0fe856c5cb584f8f9a18fc21772 100644 (file)
@@ -113,12 +113,7 @@ Select the preceding or the next menu item. Hitting _Enter_ will execute the cur
 
 All commands can be entered with either uppercase or lowercase letters (except for **W**rite). When in a submenu or at a prompt, you can hit the _Esc_ key to return to the main menu.
 
-== COLORS
-
-Implicit coloring can be disabled by creating the empty file _/etc/terminal-colors.d/cfdisk.disable_.
-
-See *terminal-colors.d*(5) for more details about colorization configuration.
-
+include::man-common/colors.adoc[]
 *cfdisk* does not support color customization with a color-scheme file.
 
 == ENVIRONMENT
index a9933c3f59ec9a4d0ad2eeb243b864e839cb5c89..e40c1cf3cc74f23400873890dc7074a34568388a 100644 (file)
@@ -175,11 +175,8 @@ Some versions of MS-DOS create a first partition which does not begin on a cylin
 
 For best results, you should always use an OS-specific partition table program. For example, you should make DOS partitions with the DOS FDISK program and Linux partitions with the Linux *fdisk* or Linux *cfdisk*(8) programs.
 
-== COLORS
-
-Implicit coloring can be disabled by an empty file _/etc/terminal-colors.d/fdisk.disable_.
-
-See *terminal-colors.d*(5) for more details about colorization configuration. The logical color names supported by *fdisk* are:
+include::man-common/colors.adoc[]
+The logical color names supported by *fdisk* are:
 
 *header*::
 The header of the output tables.
index f5896710badec29a7c07f8bce0e3ad9455820706..8d0f388f438cfe8855ef1c1b125a21c27b3854ab 100644 (file)
@@ -385,11 +385,9 @@ The same concept of backup files is used by *wipefs*(8).
 
 Note that *sfdisk* since version 2.26 no longer provides the *-I* option to restore sectors. *dd*(1) provides all necessary functionality.
 
-== COLORS
+include::man-common/colors.adoc[]
 
-Implicit coloring can be disabled by an empty file _/etc/terminal-colors.d/sfdisk.disable_.
-
-See *terminal-colors.d*(5) for more details about colorization configuration. The logical color names supported by *sfdisk* are:
+The logical color names supported by *sfdisk* are:
 
 *header*::
 The header of the output tables.
diff --git a/man-common/colors.adoc b/man-common/colors.adoc
new file mode 100644 (file)
index 0000000..4ae370f
--- /dev/null
@@ -0,0 +1,17 @@
+== COLORS
+
+The output colorization is implemented by *terminal-colors.d(5)* functionality.
+Implicit coloring can be disabled by an empty file
+____
+_/etc/terminal-colors.d/{command}.disable_
+____
+for the {command} or for all tools by
+____
+_/etc/terminal-colors.d/disable_
+____
+The user-specific _$XDG_CONFIG_HOME/terminal-colors.d_
+or _$HOME/.config/terminal-colors.d_ overrides the global setting. 
+
+Note that the output colorization may be enabled by default, and in this case
+_terminal-colors.d_ directories do not have to exist yet.
+
index 67a0d84028a762150d98f7729cec62e754c547da..fde97a8655b684886e45898fd23f74c30ca408fb 100644 (file)
@@ -144,15 +144,7 @@ A year starts on January 1. The first day of the week is determined by the local
 
 The week numbering depends on the choice of the first day of the week. If it is Sunday then the customary North American numbering is used, where 1 January is in week number 1. If it is Monday (*-m*) then the ISO 8601 standard week numbering is used, where the first Thursday is in week number 1.
 
-== COLORS
-
-Implicit coloring can be disabled as follows:
-
-____
-*touch /etc/terminal-colors.d/cal.disable*
-____
-
-See *terminal-colors.d*(5) for more details about colorization configuration.
+include::man-common/colors.adoc[]
 
 == HISTORY
 
index 64b9146d6673dbbb244d37804cf097c37f4c133a..9072f224c6c8e594dfa944c1ecda7838876a0764 100644 (file)
@@ -143,10 +143,7 @@ Decode facility and level (priority) numbers to human-readable prefixes.
 
 include::man-common/help-version.adoc[]
 
-== COLORS
-
-Implicit coloring can be disabled by an empty file _/etc/terminal-colors.d/dmesg.disable_. See *terminal-colors.d*(5) for more details about colorization configuration.
-
+include::man-common/colors.adoc[]
 The logical color names supported by *dmesg* are:
 
 *subsys*::
index a4f13761d97dd9bcf62647ecdd23cdc1663a5560..ce475fde662e4f9c35df4eccb85b6387c4f08b4d 100644 (file)
@@ -248,11 +248,7 @@ MBR Boot Signature example: Highlight the addresses cyan and the bytes at offset
    "%07.7_ax_L[cyan]  " 8/2 "   %04x_L[green:0xAA55@510-511,!red:0xAA55@510-511] " "\n"
 ....
 
-== COLORS
-
-Implicit coloring can be disabled by an empty file _/etc/terminal-colors.d/hexdump.disable_.
-
-See *terminal-colors.d*(5) for more details about colorization configuration.
+include::man-common/colors.adoc[]
 
 include::man-common/bugreports.adoc[]