1 /* $NetBSD: file_opts.h,v 1.1.1.13 2023/08/18 18:36:50 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 specifies whether is marked as "default" 10 * if POSIXLY_CORRECT is defined: 1, 11 * if POSIXLY_CORRECT is not defined: 2. 12 * The fifth column is the documentation. 13 * 14 * N.B. The long options' order must correspond to the code in file.c, 15 * and OPTSTRING must be kept up-to-date with the short options. 16 * Pay particular attention to the numbers of long-only options in the 17 * switch statement! 18 */ 19 20 OPT_LONGONLY("help", 0, 0, 21 " display this help and exit\n", OPT_HELP) 22 OPT('v', "version", 0, 0, 23 " output version information and exit\n") 24 OPT('m', "magic-file", 1, 0, 25 " LIST use LIST as a colon-separated list of magic\n" 26 " number files\n") 27 OPT('z', "uncompress", 0, 0, 28 " try to look inside compressed files\n") 29 OPT('Z', "uncompress-noreport", 0, 0, 30 " only print the contents of compressed files\n") 31 OPT('b', "brief", 0, 0, 32 " do not prepend filenames to output lines\n") 33 OPT('c', "checking-printout", 0, 0, 34 " print the parsed form of the magic file, use in\n" 35 " conjunction with -m to debug a new magic file\n" 36 " before installing it\n") 37 OPT('e', "exclude", 1, 0, 38 " TEST exclude TEST from the list of test to be\n" 39 " performed for file. Valid tests are:\n" 40 " %e\n") 41 OPT_LONGONLY("exclude-quiet", 1, 0, 42 " TEST like exclude, but ignore unknown tests\n", OPT_EXCLUDE_QUIET) 43 OPT('f', "files-from", 1, 0, 44 " FILE read the filenames to be examined from FILE\n") 45 OPT('F', "separator", 1, 0, 46 " STRING use string as separator instead of `:'\n") 47 OPT('i', "mime", 0, 0, 48 " output MIME type strings (--mime-type and\n" 49 " --mime-encoding)\n") 50 OPT_LONGONLY("apple", 0, 0, 51 " output the Apple CREATOR/TYPE\n", OPT_APPLE) 52 OPT_LONGONLY("extension", 0, 0, 53 " output a slash-separated list of extensions\n", OPT_EXTENSIONS) 54 OPT_LONGONLY("mime-type", 0, 0, 55 " output the MIME type\n", OPT_MIME_TYPE) 56 OPT_LONGONLY("mime-encoding", 0, 0, 57 " output the MIME encoding\n", OPT_MIME_ENCODING) 58 OPT('k', "keep-going", 0, 0, 59 " don't stop at the first match\n") 60 OPT('l', "list", 0, 0, 61 " list magic strength\n") 62 #ifdef S_IFLNK 63 OPT('L', "dereference", 0, 1, 64 " follow symlinks (default if POSIXLY_CORRECT is set)") 65 OPT('h', "no-dereference", 0, 2, 66 " don't follow symlinks (default if POSIXLY_CORRECT is not set)") 67 #endif 68 OPT('n', "no-buffer", 0, 0, 69 " do not buffer output\n") 70 OPT('N', "no-pad", 0, 0, 71 " do not pad output\n") 72 OPT('0', "print0", 0, 0, 73 " terminate filenames with ASCII NUL\n") 74 #if defined(HAVE_UTIME) || defined(HAVE_UTIMES) 75 OPT('p', "preserve-date", 0, 0, 76 " preserve access times on files\n") 77 #endif 78 OPT('P', "parameter", 1, 0, 79 " set file engine parameter limits\n" 80 " %P\n") 81 OPT('r', "raw", 0, 0, 82 " don't translate unprintable chars to \\ooo\n") 83 OPT('s', "special-files", 0, 0, 84 " treat special (block/char devices) files as\n" 85 " ordinary ones\n") 86 OPT('S', "no-sandbox", 0, 0, 87 " disable system call sandboxing\n") 88 OPT('C', "compile", 0, 0, 89 " compile file specified by -m\n") 90 OPT('d', "debug", 0, 0, 91 " print debugging messages\n") 92