file_opts.h 3.7 KB

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