mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-04-20 18:56:39 +02:00
(main): Handle leading command line argument of `--'.
This commit is contained in:
@@ -545,6 +545,14 @@ main (int argc, char **argv)
|
||||
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
|
||||
AUTHORS, usage);
|
||||
|
||||
/* The above handles --help and --version.
|
||||
Since there is no other invocation of getopt, handle `--' here. */
|
||||
if (1 < argc && STREQ (argv[1], "--"))
|
||||
{
|
||||
--argc;
|
||||
++argv;
|
||||
}
|
||||
|
||||
if (argc == 1)
|
||||
{
|
||||
fprintf (stderr, _("Usage: %s format [argument...]\n"), program_name);
|
||||
|
||||
Reference in New Issue
Block a user