diff options
Diffstat (limited to 'src/dircolors.c')
-rw-r--r-- | src/dircolors.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/dircolors.c b/src/dircolors.c index ac8582cf5..f17dc0a43 100644 --- a/src/dircolors.c +++ b/src/dircolors.c @@ -462,17 +462,13 @@ to select a shell syntax are mutually exclusive")); usage (EXIT_FAILURE); } - if (print_database && argc > 0) + if (!print_database < argc) { - error (0, 0, - _("no FILE arguments may be used with the option to output\n\ -dircolors' internal database")); - usage (EXIT_FAILURE); - } - - if (!print_database && argc > 1) - { - error (0, 0, _("too many arguments")); + error (0, 0, _("extra operand %s"), quote (argv[!print_database])); + if (print_database) + fprintf (stderr, "%s\n", + _("File operands cannot be combined with " + "--print-database (-p).")); usage (EXIT_FAILURE); } |