]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
docs,usage: harmonize description of --hyperlink, and add 2 missing ones
authorBenno Schulenberg <bensberg@telfort.nl>
Sat, 26 Apr 2025 09:30:18 +0000 (11:30 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 29 Apr 2025 11:02:40 +0000 (13:02 +0200)
Harmonize the description by placing the option in a separate file.

Also, use _when_/<when> (instead of _mode_/<mode>) as the optional
argument, since the possible values are: "always", "never", "auto".

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
lsfd-cmd/lsfd.1.adoc
lsfd-cmd/lsfd.c
man-common/Makemodule.am
man-common/hyperlink.adoc [new file with mode: 0644]
man-common/meson.build
misc-utils/findmnt.8.adoc
misc-utils/findmnt.c
misc-utils/lsblk.8.adoc
misc-utils/lsblk.c

index 2654e8eafa82f3a9ed8f51dc3c1233ee0c752091..9c4b8a0b5aeebdcddf5a5ceb6601813ffbf6e16f 100644 (file)
@@ -109,8 +109,7 @@ only for *lsfd* developers.
 *--dump-counters*::
 Dump the definition of counters used in *--summary* output.
 
-*--hyperlink*[=_mode_]::
-Print paths as terminal hyperlinks. The _mode_ can be set to "always", "never", or "auto". The optional argument _when_ can be set to "auto", "never", or "always". If the _when_ argument is omitted, it will default to "auto". The "auto" setting means that hyperlinks will only be used if the output is on a terminal.
+include::man-common/hyperlink.adoc[]
 
 *-H*, *--list-columns*::
 List the columns that can be specified with the *--output* option.
index 9e9cb52acdddc457d88b67624cb03c1cd7eeaf4c..d05a093966fc697deac0cf6c21365747c38fee54 100644 (file)
@@ -2196,7 +2196,7 @@ static void __attribute__((__noreturn__)) usage(void)
        fputs(_("     --debug-filter           dump the internal data structure of filter and exit\n"), out);
        fputs(_(" -C, --counter <name>:<expr>  define custom counter for --summary output\n"), out);
        fputs(_("     --dump-counters          dump counter definitions\n"), out);
-       fputs(_("     --hyperlink[=<when>]     print paths as terminal hyperlinks (always|never|auto)\n"), out);
+       fputs(_("     --hyperlink[=<when>]     print paths as hyperlinks (always|never|auto)\n"), out);
        fputs(_("     --summary[=<mode>]       print summary information (append|only|never)\n"), out);
        fputs(_("     --_drop-privilege        (testing purpose) do setuid(1) just after starting\n"), out);
 
index c999ee7cf3ccfe4af9c7ff162571cd02c634fb22..11acb73decf21034e7a45718edfc2ace496b3eb5 100644 (file)
@@ -5,6 +5,7 @@ ADOCFILES_COMMON += \
              man-common/footer-config.adoc \
              man-common/footer-lib.adoc \
              man-common/help-version.adoc \
+             man-common/hyperlink.adoc \
              man-common/in-bytes.adoc \
              man-common/manpage-stub.adoc \
              man-common/translation.adoc
diff --git a/man-common/hyperlink.adoc b/man-common/hyperlink.adoc
new file mode 100644 (file)
index 0000000..dc06749
--- /dev/null
@@ -0,0 +1,5 @@
+*--hyperlink*[**=**_when_]::
+Print paths as terminal hyperlinks. The optional _when_ argument can be
+*always*, *never*, or *auto*. If the argument is omitted, it defaults to
+*auto*, which means that hyperlinks will only be used when the output
+goes to a terminal.
index 647f54c681122b713ecd6946546aa8e83b24bd4e..b9fc9273093e1cbf192e8941005d1030c828376e 100644 (file)
@@ -5,6 +5,7 @@ man_common_adocs = files(
   'footer-config.adoc',
   'footer-lib.adoc',
   'help-version.adoc',
+  'hyperlink.adoc',
   'in-bytes.adoc',
   'manpage-stub.adoc',
   'translation.adoc',
index a26fb8ca2e88b24e96bb38bdd5152dd82de8225f..8c8ffa2cc9a613b791fd67bb9025e7cdc582f80e 100644 (file)
@@ -67,11 +67,7 @@ Print the first matching filesystem only.
 List the columns that can be specified with the *--output* option.
 Can be used with *--json* or *--raw* to get the list in a machine-readable format.
 
-*--hyperlink*[**=**_mode_]::
-Print mountpoint paths as terminal hyperlinks. The optional _mode_ argument
-can be *always*, *never*, or *auto*. If the argument is omitted, it defaults
-to *auto*, which means that hyperlinks will only be used when the output goes
-to a terminal.
+include::man-common/hyperlink.adoc[]
 
 *-I*, *--dfi*::
 Imitate the output of *df*(1) with its *-i* option. This option is equivalent to *-o SOURCE,FSTYPE,INO.TOTAL,INO.USED,INO.AVAIL,INO.USE%,TARGET* but excludes all pseudo filesystems. Use *--all* to print all filesystems.
index 2682de1d7713f5ec9a38e3e9a983b93fda1db405..130ac1b13906cff93e25e72a5278142b0c9966e9 100644 (file)
@@ -1568,6 +1568,8 @@ static void __attribute__((__noreturn__)) usage(void)
        fputs(_(" -D, --df               imitate the output of df(1)\n"), out);
        fputs(_(" -e, --evaluate         convert tags (LABEL,UUID,PARTUUID,PARTLABEL) \n"
                "                          to device names\n"), out);
+       fputs(_("     --hyperlink[=<when>]\n"
+               "                        print paths as hyperlinks (always|never|auto)\n"), out);
        fputs(_(" -I, --dfi              imitate the output of df(1) with -i option\n"), out);
        fputs(_(" -J, --json             use JSON output format\n"), out);
        fputs(_(" -l, --list             use list format output\n"), out);
index 8151525af96b364b0593b0f80f7b39f573b2e7ab..04efa276cae86030eb76c9c97ea993f9ef5174b6 100644 (file)
@@ -62,8 +62,7 @@ Exclude the devices specified by the comma-separated _list_ of major device numb
 *-f*, *--fs*::
 Output info about filesystems. This option is equivalent to *-o NAME,FSTYPE,FSVER,LABEL,UUID,FSAVAIL,FSUSE%,MOUNTPOINTS*. The authoritative information about filesystems and raids is provided by the *blkid*(8) command.
 
-*--hyperlink*[**=**_mode_]::
-Print mountpoint paths as terminal hyperlinks. The _mode_ can be set to "always", "never", or "auto". The optional argument _when_ can be set to "auto", "never", or "always". If the _when_ argument is omitted, it will default to "auto". The "auto" setting means that hyperlinks will only be used if the output is on a terminal.
+include::man-common/hyperlink.adoc[]
 
 *-I*, *--include* _list_::
 Include devices specified by the comma-separated _list_ of major device numbers. The filter is applied to the top-level devices only. This may be confusing for *--list* output format where hierarchy of the devices is not obvious.
index 7daa7f58f9d4f257188e2e7c0dfefc4cd794b24f..a65f5e4e621defb85cf2fbb1da97f8dc1c87a530 100644 (file)
@@ -2330,6 +2330,8 @@ static void __attribute__((__noreturn__)) usage(void)
        fputs(_(" -d, --nodeps         don't print slaves or holders\n"), out);
        fputs(_(" -e, --exclude <list> exclude devices by major number (default: RAM disks)\n"), out);
        fputs(_(" -f, --fs             output info about filesystems\n"), out);
+       fputs(_("     --hyperlink[=<when>]\n"
+               "                      print paths as hyperlinks (always|never|auto)\n"), out);
        fputs(_(" -i, --ascii          use ascii characters only\n"), out);
        fputs(_(" -l, --list           use list format output\n"), out);
        fputs(_(" -m, --perms          output info about permissions\n"), out);