xref: /minix/external/bsd/file/dist/src/file_opts.h (revision 84d9c625)
1 /*	$NetBSD: file_opts.h,v 1.1.1.3 2013/01/03 16:27:52 christos Exp $	*/
2 
3 /*
4  * Table of command-line options
5  *
6  * The first column specifies the short name, if any, or 0 if none.
7  * The second column specifies the long name.
8  * The third column specifies whether it takes a parameter.
9  * The fourth column is the documentation.
10  *
11  * N.B. The long options' order must correspond to the code in file.c,
12  * and OPTSTRING must be kept up-to-date with the short options.
13  * Pay particular attention to the numbers of long-only options in the
14  * switch statement!
15  */
16 
17 OPT_LONGONLY("help", 0, "                 display this help and exit\n")
18 OPT('v', "version", 0, "              output version information and exit\n")
19 OPT('m', "magic-file", 1, " LIST      use LIST as a colon-separated list of magic\n"
20     "                               number files\n")
21 OPT('z', "uncompress", 0, "           try to look inside compressed files\n")
22 OPT('b', "brief", 0, "                do not prepend filenames to output lines\n")
23 OPT('c', "checking-printout", 0, "    print the parsed form of the magic file, use in\n"
24     "                               conjunction with -m to debug a new magic file\n"
25     "                               before installing it\n")
26 OPT('e', "exclude", 1, " TEST         exclude TEST from the list of test to be\n"
27     "                               performed for file. Valid tests are:\n"
28     "                               %o\n")
29 OPT('f', "files-from", 1, " FILE      read the filenames to be examined from FILE\n")
30 OPT('F', "separator", 1, " STRING     use string as separator instead of `:'\n")
31 OPT('i', "mime", 0, "                 output MIME type strings (--mime-type and\n"
32     "                               --mime-encoding)\n")
33 OPT_LONGONLY("apple", 0, "                output the Apple CREATOR/TYPE\n")
34 OPT_LONGONLY("mime-type", 0, "            output the MIME type\n")
35 OPT_LONGONLY("mime-encoding", 0, "        output the MIME encoding\n")
36 OPT('k', "keep-going", 0, "           don't stop at the first match\n")
37 #ifdef S_IFLNK
38 OPT('l', "list", 0, "                 list magic strength\n")
39 OPT('L', "dereference", 0, "          follow symlinks (default)\n")
40 OPT('h', "no-dereference", 0, "       don't follow symlinks\n")
41 #endif
42 OPT('n', "no-buffer", 0, "            do not buffer output\n")
43 OPT('N', "no-pad", 0, "               do not pad output\n")
44 OPT('0', "print0", 0, "               terminate filenames with ASCII NUL\n")
45 #if defined(HAVE_UTIME) || defined(HAVE_UTIMES)
46 OPT('p', "preserve-date", 0, "        preserve access times on files\n")
47 #endif
48 OPT('r', "raw", 0, "                  don't translate unprintable chars to \\ooo\n")
49 OPT('s', "special-files", 0, "        treat special (block/char devices) files as\n"
50     "                             ordinary ones\n")
51 OPT('C', "compile", 0, "              compile file specified by -m\n")
52 OPT('d', "debug", 0, "                print debugging messages\n")
53