Browse Source

man-pages: consolidate COLORS section

* 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>
pull/1599/head
Karel Zak 6 months ago
parent
commit
6c62faf149
  1. 7
      disk-utils/cfdisk.8.adoc
  2. 7
      disk-utils/fdisk.8.adoc
  3. 6
      disk-utils/sfdisk.8.adoc
  4. 17
      man-common/colors.adoc
  5. 10
      misc-utils/cal.1.adoc
  6. 5
      sys-utils/dmesg.1.adoc
  7. 6
      text-utils/hexdump.1.adoc

7
disk-utils/cfdisk.8.adoc

@ -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

7
disk-utils/fdisk.8.adoc

@ -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.

6
disk-utils/sfdisk.8.adoc

@ -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.

17
man-common/colors.adoc

@ -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.

10
misc-utils/cal.1.adoc

@ -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

5
sys-utils/dmesg.1.adoc

@ -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*::

6
text-utils/hexdump.1.adoc

@ -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[]

Loading…
Cancel
Save