xref: /dflybsd-src/contrib/file/src/file_opts.h (revision 739f0ef867128a933e021db3d831e906fcafd825)
1327e51cbSPeter Avalos /*
2327e51cbSPeter Avalos  * Table of command-line options
3327e51cbSPeter Avalos  *
4327e51cbSPeter Avalos  * The first column specifies the short name, if any, or 0 if none.
5327e51cbSPeter Avalos  * The second column specifies the long name.
6327e51cbSPeter Avalos  * The third column specifies whether it takes a parameter.
7*3b9cdfa3SAntonio Huete Jimenez  * The fourth column specifies whether is marked as "default"
86fca56fbSSascha Wildner  *      if POSIXLY_CORRECT is defined: 1,
96fca56fbSSascha Wildner  *      if POSIXLY_CORRECT is not defined: 2.
106fca56fbSSascha Wildner  * The fifth column is the documentation.
11327e51cbSPeter Avalos  *
12327e51cbSPeter Avalos  * N.B. The long options' order must correspond to the code in file.c,
13327e51cbSPeter Avalos  * and OPTSTRING must be kept up-to-date with the short options.
14327e51cbSPeter Avalos  * Pay particular attention to the numbers of long-only options in the
15327e51cbSPeter Avalos  * switch statement!
16327e51cbSPeter Avalos  */
17327e51cbSPeter Avalos 
18c990e5baSDaniel Fojt OPT_LONGONLY("help", 0, 0,
19c990e5baSDaniel Fojt     "                 display this help and exit\n", OPT_HELP)
20c990e5baSDaniel Fojt OPT('v', "version", 0, 0,
21c990e5baSDaniel Fojt     "              output version information and exit\n")
22c990e5baSDaniel Fojt OPT('m', "magic-file", 1, 0,
23c990e5baSDaniel Fojt     " LIST      use LIST as a colon-separated list of magic\n"
24327e51cbSPeter Avalos     "                               number files\n")
25c990e5baSDaniel Fojt OPT('z', "uncompress", 0, 0,
26c990e5baSDaniel Fojt     "           try to look inside compressed files\n")
27c990e5baSDaniel Fojt OPT('Z', "uncompress-noreport", 0, 0,
28c990e5baSDaniel Fojt     "  only print the contents of compressed files\n")
29c990e5baSDaniel Fojt OPT('b', "brief", 0, 0,
30c990e5baSDaniel Fojt     "                do not prepend filenames to output lines\n")
31c990e5baSDaniel Fojt OPT('c', "checking-printout", 0, 0,
32c990e5baSDaniel Fojt     "    print the parsed form of the magic file, use in\n"
33327e51cbSPeter Avalos     "                               conjunction with -m to debug a new magic file\n"
34327e51cbSPeter Avalos     "                               before installing it\n")
35c990e5baSDaniel Fojt OPT('e', "exclude", 1, 0,
36c990e5baSDaniel Fojt     " TEST         exclude TEST from the list of test to be\n"
37327e51cbSPeter Avalos     "                               performed for file. Valid tests are:\n"
38c990e5baSDaniel Fojt     "                               %e\n")
39c990e5baSDaniel Fojt OPT_LONGONLY("exclude-quiet", 1, 0,
40c990e5baSDaniel Fojt     " TEST         like exclude, but ignore unknown tests\n", OPT_EXCLUDE_QUIET)
41c990e5baSDaniel Fojt OPT('f', "files-from", 1, 0,
42c990e5baSDaniel Fojt     " FILE      read the filenames to be examined from FILE\n")
43c990e5baSDaniel Fojt OPT('F', "separator", 1, 0,
44c990e5baSDaniel Fojt     " STRING     use string as separator instead of `:'\n")
45c990e5baSDaniel Fojt OPT('i', "mime", 0, 0,
46c990e5baSDaniel Fojt     "                 output MIME type strings (--mime-type and\n"
47327e51cbSPeter Avalos     "                               --mime-encoding)\n")
48c990e5baSDaniel Fojt OPT_LONGONLY("apple", 0, 0,
49c990e5baSDaniel Fojt     "                output the Apple CREATOR/TYPE\n", OPT_APPLE)
50c990e5baSDaniel Fojt OPT_LONGONLY("extension", 0, 0,
51c990e5baSDaniel Fojt     "            output a slash-separated list of extensions\n", OPT_EXTENSIONS)
52c990e5baSDaniel Fojt OPT_LONGONLY("mime-type", 0, 0,
53c990e5baSDaniel Fojt     "            output the MIME type\n", OPT_MIME_TYPE)
54c990e5baSDaniel Fojt OPT_LONGONLY("mime-encoding", 0, 0,
55c990e5baSDaniel Fojt     "        output the MIME encoding\n", OPT_MIME_ENCODING)
56c990e5baSDaniel Fojt OPT('k', "keep-going", 0, 0,
57c990e5baSDaniel Fojt     "           don't stop at the first match\n")
58c990e5baSDaniel Fojt OPT('l', "list", 0, 0,
59c990e5baSDaniel Fojt     "                 list magic strength\n")
60e8af9738SPeter Avalos #ifdef S_IFLNK
61c990e5baSDaniel Fojt OPT('L', "dereference", 0, 1,
62c990e5baSDaniel Fojt     "          follow symlinks")
63c990e5baSDaniel Fojt OPT('h', "no-dereference", 0, 2,
64c990e5baSDaniel Fojt     "       don't follow symlinks")
65327e51cbSPeter Avalos #endif
66c990e5baSDaniel Fojt OPT('n', "no-buffer", 0, 0,
67c990e5baSDaniel Fojt     "            do not buffer output\n")
68c990e5baSDaniel Fojt OPT('N', "no-pad", 0, 0,
69c990e5baSDaniel Fojt     "               do not pad output\n")
70c990e5baSDaniel Fojt OPT('0', "print0", 0, 0,
71c990e5baSDaniel Fojt     "               terminate filenames with ASCII NUL\n")
72327e51cbSPeter Avalos #if defined(HAVE_UTIME) || defined(HAVE_UTIMES)
73c990e5baSDaniel Fojt OPT('p', "preserve-date", 0, 0,
74c990e5baSDaniel Fojt     "        preserve access times on files\n")
75327e51cbSPeter Avalos #endif
76c990e5baSDaniel Fojt OPT('P', "parameter", 1, 0,
77c990e5baSDaniel Fojt     "            set file engine parameter limits\n"
78c990e5baSDaniel Fojt     "                               %P\n")
79c990e5baSDaniel Fojt OPT('r', "raw", 0, 0,
80c990e5baSDaniel Fojt     "                  don't translate unprintable chars to \\ooo\n")
81c990e5baSDaniel Fojt OPT('s', "special-files", 0, 0,
82c990e5baSDaniel Fojt     "        treat special (block/char devices) files as\n"
83327e51cbSPeter Avalos     "                             ordinary ones\n")
84c990e5baSDaniel Fojt OPT('S', "no-sandbox", 0, 0,
85c990e5baSDaniel Fojt     "           disable system call sandboxing\n")
86c990e5baSDaniel Fojt OPT('C', "compile", 0, 0,
87c990e5baSDaniel Fojt     "              compile file specified by -m\n")
88c990e5baSDaniel Fojt OPT('d', "debug", 0, 0,
89c990e5baSDaniel Fojt     "                print debugging messages\n")
90