import { type OptionPolicy, setOf, validateOptions } from "./options"; const OPTIONS: OptionPolicy = { shortFlags: setOf( ".", "0", "F", "H", "I", "L", "N", "P", "S", "U", "V", "a", "b", "c", "h", "i", "l", "n", "o", "p", "q", "s", "u", "v", "w", "x", ), shortValues: setOf("A", "B", "C", "E", "M", "T", "d", "e", "f", "g", "j", "m", "r", "t"), longFlags: setOf( "auto-hybrid-regex", "binary", "block-buffered", "byte-offset", "case-sensitive", "column", "count", "count-matches", "crlf", "debug", "files", "files-with-matches", "files-without-match", "fixed-strings", "follow", "glob-case-insensitive", "heading", "help", "hidden", "ignore-case", "ignore-file-case-insensitive", "include-zero", "invert-match", "json", "line-buffered", "line-number", "line-regexp", "max-columns-preview", "messages", "mmap", "multiline", "multiline-dotall", "no-config", "no-filename", "no-follow", "no-heading", "no-ignore", "no-ignore-dot", "no-ignore-exclude", "no-ignore-files", "no-ignore-global", "no-ignore-messages", "no-ignore-parent", "no-ignore-vcs", "no-line-number", "no-messages", "no-pcre2-unicode", "no-pre", "no-require-git", "no-search-zip", "no-unicode", "null", "null-data", "one-file-system", "only-matching", "passthru", "pcre2", "pcre2-version", "pretty", "quiet", "smart-case", "sort-files", "stats", "stop-on-nonmatch", "text", "trace", "trim", "type-list", "unrestricted", "version", "vimgrep", "with-filename", "word-regexp", ), longValues: setOf( "after-context", "before-context", "color", "colors", "context", "context-separator", "dfa-size-limit", "encoding", "engine", "field-context-separator", "field-match-separator", "file", "generate", "glob", "hyperlink-format", "iglob", "ignore-file", "max-columns", "max-count", "max-depth", "max-filesize", "path-separator", "regex-size-limit", "regexp", "replace", "sort", "sortr", "threads", "type", "type-add", "type-clear", "type-not", ), allowPositionals: true, }; export function validateRg(args: readonly string[]): boolean { return validateOptions(args, OPTIONS); }