]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
getopt: document whitespace as separator in --longoptions
authorWanBingjiang <wanbingjiang@webray.com.cn>
Mon, 16 Mar 2026 03:59:56 +0000 (11:59 +0800)
committerWanBingjiang <wanbingjiang@webray.com.cn>
Mon, 16 Mar 2026 03:59:56 +0000 (11:59 +0800)
  The --longoptions option accepts not only commas but also whitespace
  (spaces, tabs, or newlines) as separators between option names.
  Update the man page to reflect this behavior.

  Addresses: https://github.com/util-linux/util-linux/issues/4119

misc-utils/getopt.1.adoc

index 7322038f16aec5cffe14e2331455e76198043b5c..a68b1a49a58ccbccbc51c95fed2c31e1588d013b 100644 (file)
@@ -35,7 +35,7 @@ Traditional implementations of *getopt*(1) are unable to cope with whitespace an
 Allow long options to start with a single '*-*'.
 
 *-l*, *--longoptions* _longopts_::
-The long (multi-character) options to be recognized. More than one option name may be specified at once, by separating the names with commas. This option may be given more than once, the _longopts_ are cumulative. Each long option name in _longopts_ may be followed by one colon to indicate it has a required argument, and by two colons to indicate it has an optional argument.
+The long (multi-character) options to be recognized. More than one option name may be specified at once, by separating the names with commas, whitespace (spaces, tabs, or newlines). This option may be given more than once, the _longopts_ are cumulative. Each long option name in _longopts_ may be followed by one colon to indicate it has a required argument, and by two colons to indicate it has an optional argument.
 
 *-n*, *--name* _progname_::
 The name that will be used by the *getopt*(3) routines when it reports errors. Note that errors of *getopt*(1) are still reported as coming from getopt.