From: Karel Zak Date: Tue, 24 Feb 2026 08:54:12 +0000 (+0100) Subject: man pages: consolidate libsmartcols environment variables X-Git-Tag: v2.43-devel~43^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=410a4d83473278429265f552fe24207bf76e96d1;p=thirdparty%2Futil-linux.git man pages: consolidate libsmartcols environment variables Introduce man-common/env-smartcols.adoc to describe all libsmartcols environment variables (LIBSMARTCOLS_DEBUG, LIBSMARTCOLS_DEBUG_PADDING, LIBSMARTCOLS_JSON) in one place. Replace duplicated LIBSMARTCOLS_DEBUG descriptions in cfdisk, fdisk, sfdisk, findmnt, lsblk, and column man pages with an include of the new common file. Addresses: https://github.com/util-linux/util-linux/issues/3971 Signed-off-by: Karel Zak --- diff --git a/disk-utils/cfdisk.8.adoc b/disk-utils/cfdisk.8.adoc index 33bbd4af6..bb2c1dbc6 100644 --- a/disk-utils/cfdisk.8.adoc +++ b/disk-utils/cfdisk.8.adoc @@ -137,11 +137,7 @@ enables libfdisk debug output. *LIBBLKID_DEBUG*=all:: enables libblkid debug output. -*LIBSMARTCOLS_DEBUG*=all:: -enables libsmartcols debug output. - -*LIBSMARTCOLS_DEBUG_PADDING*=on:: -use visible padding characters. Requires enabled *LIBSMARTCOLS_DEBUG*. +include::man-common/env-smartcols.adoc[] *LOCK_BLOCK_DEVICE*=:: use exclusive BSD lock. The mode is "1" or "0". See *--lock* for more details. diff --git a/disk-utils/fdisk.8.adoc b/disk-utils/fdisk.8.adoc index 7f2f6a42f..d666bc83a 100644 --- a/disk-utils/fdisk.8.adoc +++ b/disk-utils/fdisk.8.adoc @@ -210,11 +210,7 @@ enables libfdisk debug output. *LIBBLKID_DEBUG*=all:: enables libblkid debug output. -*LIBSMARTCOLS_DEBUG*=all:: -enables libsmartcols debug output. - -*LIBSMARTCOLS_DEBUG_PADDING*=on:: -use visible padding characters. +include::man-common/env-smartcols.adoc[] *LOCK_BLOCK_DEVICE*=:: use exclusive BSD lock. The mode is "1" or "0". See *--lock* for more details. diff --git a/disk-utils/sfdisk.8.adoc b/disk-utils/sfdisk.8.adoc index 781b4cbf1..5b9613ad9 100644 --- a/disk-utils/sfdisk.8.adoc +++ b/disk-utils/sfdisk.8.adoc @@ -440,8 +440,8 @@ enables *sfdisk* debug output. enables libfdisk debug output. *LIBBLKID_DEBUG*=all:: enables libblkid debug output. -*LIBSMARTCOLS_DEBUG*=all:: -enables libsmartcols debug output. +include::man-common/env-smartcols.adoc[] + *LOCK_BLOCK_DEVICE*=:: use exclusive BSD lock. The mode is "1" or "0". See *--lock* for more details. diff --git a/man-common/Makemodule.am b/man-common/Makemodule.am index f0db0456f..8fa7be50e 100644 --- a/man-common/Makemodule.am +++ b/man-common/Makemodule.am @@ -9,4 +9,5 @@ ADOCFILES_COMMON += \ man-common/hyperlink.adoc \ man-common/in-bytes.adoc \ man-common/manpage-stub.adoc \ + man-common/env-smartcols.adoc \ man-common/translation.adoc diff --git a/man-common/env-smartcols.adoc b/man-common/env-smartcols.adoc new file mode 100644 index 000000000..d5c34319c --- /dev/null +++ b/man-common/env-smartcols.adoc @@ -0,0 +1,11 @@ +*LIBSMARTCOLS_DEBUG*=all:: +enables libsmartcols debug output. + +*LIBSMARTCOLS_DEBUG_PADDING*=on:: +use visible padding characters. + +*LIBSMARTCOLS_JSON*=compact|lines:: +Controls JSON output format when using *--json*. Supported values are +*compact* for JSON output with minimal whitespace, and *lines* for JSON Lines +format (one JSON object per line). If unset or set to any other value, +pretty-printed JSON is used. diff --git a/man-common/meson.build b/man-common/meson.build index 7e86f1f94..1111ebfb4 100644 --- a/man-common/meson.build +++ b/man-common/meson.build @@ -9,5 +9,6 @@ man_common_adocs = files( 'hyperlink.adoc', 'in-bytes.adoc', 'manpage-stub.adoc', + 'env-smartcols.adoc', 'translation.adoc', ) diff --git a/misc-utils/findmnt.8.adoc b/misc-utils/findmnt.8.adoc index eba34042a..38220fb24 100644 --- a/misc-utils/findmnt.8.adoc +++ b/misc-utils/findmnt.8.adoc @@ -224,11 +224,7 @@ overrides the default location of the _mtab_ file *LIBMOUNT_DEBUG*=all:: enables libmount debug output -*LIBSMARTCOLS_DEBUG*=all:: -enables libsmartcols debug output - -*LIBSMARTCOLS_DEBUG_PADDING*=on:: -use visible padding characters. +include::man-common/env-smartcols.adoc[] == EXAMPLES diff --git a/misc-utils/lsblk.8.adoc b/misc-utils/lsblk.8.adoc index 4fc6cc6b5..4071411f2 100644 --- a/misc-utils/lsblk.8.adoc +++ b/misc-utils/lsblk.8.adoc @@ -228,11 +228,7 @@ enables *libblkid* debug output. *LIBMOUNT_DEBUG*=all:: enables *libmount* debug output. -*LIBSMARTCOLS_DEBUG*=all:: -enables *libsmartcols* debug output. - -*LIBSMARTCOLS_DEBUG_PADDING*=on:: -use visible padding characters. +include::man-common/env-smartcols.adoc[] *LSBLK_COLUMNS*=:: specifies a comma-separated list of output columns to print. All columns listed by *--list-columns* can be used. diff --git a/po-man/po4a.cfg b/po-man/po4a.cfg index b888e694f..d49493fc5 100644 --- a/po-man/po4a.cfg +++ b/po-man/po4a.cfg @@ -4,6 +4,7 @@ [type:asciidoc] ../man-common/annotate.adoc $lang:$lang/man-common/annotate.adoc opt:"--keep 0" [type:asciidoc] ../man-common/bugreports.adoc $lang:$lang/man-common/bugreports.adoc opt:"--keep 0" [type:asciidoc] ../man-common/colors.adoc $lang:$lang/man-common/colors.adoc opt:"--keep 0" +[type:asciidoc] ../man-common/env-smartcols.adoc $lang:$lang/man-common/env-smartcols.adoc opt:"--keep 0" [type:asciidoc] ../man-common/footer-config.adoc $lang:$lang/man-common/footer-config.adoc opt:"--keep 0" [type:asciidoc] ../man-common/footer-lib.adoc $lang:$lang/man-common/footer-lib.adoc opt:"--keep 0" [type:asciidoc] ../man-common/footer.adoc $lang:$lang/man-common/footer.adoc opt:"--keep 0" diff --git a/text-utils/column.1.adoc b/text-utils/column.1.adoc index b17fb199a..e20f8ecbf 100644 --- a/text-utils/column.1.adoc +++ b/text-utils/column.1.adoc @@ -255,15 +255,7 @@ will be colorized by direct color names. *COLUMNS*:: is used to determine the size of the screen if no other information is available. -*LIBSMARTCOLS_JSON*:: -Controls JSON output format when using *--json*. Supported values: -+ -*compact*:: -Output JSON in compact form (minified, minimal whitespace). -*lines*:: -Output in JSON Lines format (one JSON object per line). -+ -If unset or set to any other value, pretty-printed JSON is used. +include::man-common/env-smartcols.adoc[] == HISTORY