{"csh", no_argument, NULL, 'c'},
{"c-shell", no_argument, NULL, 'c'},
{"help", no_argument, NULL, 'h'},
+ {"print-database", no_argument, NULL, 'p'},
{"version", no_argument, NULL, 'v'},
+ {NULL, 0, NULL, 0}
};
char *program_name;
{
printf (_("Usage: %s [OPTION]... [FILE]\n"), program_name);
printf (_("\
- printf (_("\
-Output commands to set the LS_COLOR environment variable.\n\
+Output commands to set the LS_COLORS environment variable.\n\
\n\
- -h, --help display this help and exit\n\
- --version output version information and exit\n\
Determine format of output:\n\
- -p, --print-data-base output defaults\n\
- -b, --sh, --bourne-shell output Bourne shell code to set LS_COLOR\n\
- -c, --csh, --c-shell output C shell code to set LS_COLOR\n"));
+ -b, --sh, --bourne-shell output Bourne shell code to set LS_COLORS\n\
+ -c, --csh, --c-shell output C shell code to set LS_COLORS\n\
+ -p, --print-database output defaults\n\
+ --help display this help and exit\n\
+ --version output version information and exit\n\
+\n\
+If FILE is specified, read it to determine which colors to use for which\n\
+file types and extensions. Otherwise, a precompiled database is used.\n\
+For details on the format of these files, run `dircolors --print-database'.\n\
+"));
+ puts (_("\nReport bugs to <fileutils-bugs@gnu.ai.mit.edu>."));
}
exit (status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
{
char *new = strndup (s, n);
if (new == NULL)
- error (EXIT_FAILURE, 0, _("Memory exhausted"));
+ error (EXIT_FAILURE, 0, _("virtual memory exhausted"));
return new;
}
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- parse_long_options (argc, argv, "dircolors", PACKAGE_VERSION, usage);
+ parse_long_options (argc, argv, "dircolors", GNU_PACKAGE, VERSION, usage);
- while ((optc = getopt_long (argc, argv, "bcp", long_options, NULL))
- != EOF)
+ while ((optc = getopt_long (argc, argv, "bcp", long_options, NULL)) != -1)
switch (optc)
{
case 'b': /* Bourne shell syntax. */