From 4f44b6ae4ed6ed508554c6cd4a5573794e25a36a Mon Sep 17 00:00:00 2001 From: Chris Antos Date: Fri, 8 Mar 2024 03:46:44 -0800 Subject: [PATCH] Update rg.lua per ripgrep v14.1.0 --- completions/rg.lua | 463 +++++++++++++++++++++++++++------------------ 1 file changed, 274 insertions(+), 189 deletions(-) diff --git a/completions/rg.lua b/completions/rg.lua index 8673121..6353463 100644 --- a/completions/rg.lua +++ b/completions/rg.lua @@ -9,213 +9,257 @@ end try_require("arghelper") -local rg_sortr = clink.argmatcher():addarg({"path", "modified", "accessed", "created", "none"}) -local rg_sort = clink.argmatcher():addarg({"path", "modified", "accessed", "created", "none"}) -local rg_engine = clink.argmatcher():addarg({"default", "pcre2", "auto"}) +local rg_fieldcontextseparator = clink.argmatcher():addarg({}) +local rg_maxdepth = clink.argmatcher():addarg({}) +local rg_beforecontext = clink.argmatcher():addarg({}) +local rg_maxfilesize = clink.argmatcher():addarg({}) +local rg_pathseparator = clink.argmatcher():addarg({}) +local rg_generate = clink.argmatcher():addarg({"man", "complete-bash", "complete-zsh", "complete-fish", "complete-powershell"}) +local rg_colors = clink.argmatcher():addarg({}) +local rg_hostnamebin = clink.argmatcher():addarg({"(__fish_complete_command)"}) +local rg_context = clink.argmatcher():addarg({}) +local rg_regexsizelimit = clink.argmatcher():addarg({}) +local rg_iglob = clink.argmatcher():addarg({}) +local rg_encoding = clink.argmatcher():addarg({}) +local rg_dfasizelimit = clink.argmatcher():addarg({}) local rg_color = clink.argmatcher():addarg({"never", "auto", "always", "ansi"}) +local rg_preglob = clink.argmatcher():addarg({}) +local rg_aftercontext = clink.argmatcher():addarg({}) +local rg_engine = clink.argmatcher():addarg({"default", "pcre2", "auto"}) +local rg_type = clink.argmatcher():addarg({"(rg", "--type-list", "|", "string", "replace", ":", "t)"}) +local rg_file = clink.argmatcher():addarg({}) +local rg_maxcolumns = clink.argmatcher():addarg({}) +local rg_ignorefile = clink.argmatcher():addarg({}) +local rg_glob = clink.argmatcher():addarg({}) +local rg_typeclear = clink.argmatcher():addarg({}) +local rg_typeadd = clink.argmatcher():addarg({}) +local rg_typenot = clink.argmatcher():addarg({"(rg", "--type-list", "|", "string", "replace", ":", "t)"}) +local rg_replace = clink.argmatcher():addarg({}) +local rg_threads = clink.argmatcher():addarg({}) +local rg_fieldmatchseparator = clink.argmatcher():addarg({}) +local rg_maxcount = clink.argmatcher():addarg({}) +local rg_sortr = clink.argmatcher():addarg({"none", "path", "modified", "accessed", "created"}) +local rg_contextseparator = clink.argmatcher():addarg({}) +local rg_sort = clink.argmatcher():addarg({"none", "path", "modified", "accessed", "created"}) +local rg_pre = clink.argmatcher():addarg({"(__fish_complete_command)"}) +local rg_regexp = clink.argmatcher():addarg({}) +local rg_hyperlinkformat = clink.argmatcher():addarg({}) clink.argmatcher("rg") :adddescriptions({ - ["-u"] = { "Reduce the level of "smart" searching." }, - ["-g"] = { "Include or exclude files." }, - ["--before-context"] = { "Show NUM lines before each match." }, - ["-m"] = { "Limit the number of matches." }, - ["--crlf"] = { "Support CRLF line terminators (useful on Windows)." }, - ["--max-columns-preview"] = { "Print a preview for lines exceeding the limit." }, - ["--max-columns"] = { "Don't print lines longer than this limit." }, - ["--auto-hybrid-regex"] = { "Dynamically use PCRE2 if necessary." }, - ["--no-unicode"] = { "Disable Unicode mode." }, - ["-0"] = { "Print a NUL byte after file paths." }, - ["-x"] = { "Only show matches surrounded by line boundaries." }, - ["-h"] = { "Prints help information. Use --help for more details." }, - ["-p"] = { "Alias for --color always --heading --line-number." }, - ["--pre"] = { "search outputs of COMMAND FILE for each FILE" }, - ["--colors"] = { "Configure color settings and styles." }, - ["--dfa-size-limit"] = { "The upper size limit of the regex DFA." }, - ["--max-filesize"] = { "Ignore files larger than NUM in size." }, - ["--case-sensitive"] = { "Search case sensitively (default)." }, - ["--pcre2-version"] = { "Print the version of PCRE2 that ripgrep uses." }, - ["--no-ignore-parent"] = { "Don't respect ignore files in parent directories." }, - ["--pre-glob"] = { "Include or exclude files from a preprocessing command." }, - ["-w"] = { "Only show matches surrounded by word boundaries." }, - ["-e"] = { "A pattern to search for." }, - ["--no-require-git"] = { "Do not require a git repository to use gitignores." }, - ["--follow"] = { "Follow symbolic links." }, - ["--files"] = { "Print each file that would be searched." }, ["--only-matching"] = { "Print only matched parts of a line." }, - ["--line-buffered"] = { "Force line buffering." }, - ["--unrestricted"] = { "Reduce the level of "smart" searching." }, - ["-M"] = { "Don't print lines longer than this limit." }, - ["--invert-match"] = { "Invert matching." }, - ["--stats"] = { "Print statistics about this ripgrep search." }, - ["-U"] = { "Enable matching across multiple lines." }, - ["--count"] = { "Only show the count of matching lines for each file." }, - ["-E"] = { "Specify the text encoding of files to search." }, - ["--replace"] = { "Replace matches with the given text." }, - ["--threads"] = { "The approximate number of threads to use." }, - ["--regex-size-limit"] = { "The upper size limit of the compiled regex." }, - ["-f"] = { "Search for patterns from the given file." }, - ["-r"] = { "Replace matches with the given text." }, - ["-j"] = { "The approximate number of threads to use." }, - ["--engine"] = { " arg", "Specify which regexp engine to use." }, - ["--file"] = { "Search for patterns from the given file." }, - ["--type"] = { "Only search files matching TYPE." }, - ["--type-clear"] = { "Clear globs for a file type." }, - ["-V"] = { "Prints version information" }, - ["--no-pcre2-unicode"] = { "Disable Unicode mode for PCRE2 matching." }, - ["-z"] = { "Search in compressed files." }, - ["--block-buffered"] = { "Force block buffering." }, - ["--glob-case-insensitive"] = { "Process all glob patterns case insensitively." }, - ["--one-file-system"] = { "Do not descend into directories on other file systems." }, - ["-c"] = { "Only show the count of matching lines for each file." }, - ["--regexp"] = { "A pattern to search for." }, - ["-q"] = { "Do not print anything to stdout." }, - ["-i"] = { "Case insensitive search." }, - ["--version"] = { "Prints version information" }, - ["--type-not"] = { "Do not search files matching TYPE." }, - ["--debug"] = { "Show debug messages." }, - ["--glob"] = { "Include or exclude files." }, - ["--count-matches"] = { "Only show the count of individual matches for each file." }, - ["--no-config"] = { "Never read configuration files." }, - ["--smart-case"] = { "Smart case search." }, + ["--quiet"] = { "Do not print anything to stdout." }, + ["--ignore-case"] = { "Case insensitive search." }, + ["--multiline-dotall"] = { "Make '.' match line terminators." }, + ["-A"] = { " arg", "Show NUM lines after each match." }, + ["--after-context"] = { " arg", "Show NUM lines after each match." }, + ["-h"] = { "Show help output." }, + ["-a"] = { "Search binary files as if they were text." }, + ["--ignore-parent"] = { "Don't use ignore files in parent directories." }, + ["--ignore-global"] = { "Don't use global ignore files." }, + ["--no-hidden"] = { "Search hidden files and directories." }, + ["-I"] = { "Never print the path with each matching line." }, + ["--colors"] = { " arg", "Configure color settings and styles." }, + ["--no-auto-hybrid-regex"] = { "(DEPRECATED) Use PCRE2 if appropriate." }, + ["--ignore-file-case-insensitive"] = { "Process ignore files case insensitively." }, + ["--json"] = { "Show search results in a JSON Lines format." }, + ["--passthru"] = { "Print both matching and non-matching lines." }, ["--type-list"] = { "Show all supported file types." }, - ["--multiline-dotall"] = { "Make '.' match new lines when multiline is enabled." }, - ["-C"] = { "Show NUM lines before and after each match." }, + ["--messages"] = { "Suppress some error messages." }, ["--line-number"] = { "Show line numbers." }, - ["--search-zip"] = { "Search in compressed files." }, - ["--json"] = { "Show search results in a JSON Lines format." }, - ["-S"] = { "Smart case search." }, - ["--context"] = { "Show NUM lines before and after each match." }, - ["-t"] = { "Only search files matching TYPE." }, - ["--no-filename"] = { "Never print the file path with the matched lines." }, - ["-l"] = { "Print the paths with at least one match." }, - ["--max-depth"] = { "Descend at most NUM directories." }, - ["--heading"] = { "Print matches grouped by each file." }, - ["--context-separator"] = { "Set the context separator string." }, - ["-L"] = { "Follow symbolic links." }, - ["--encoding"] = { "Specify the text encoding of files to search." }, - ["--pretty"] = { "Alias for --color always --heading --line-number." }, - ["--sortr"] = { " arg", "Sort results in descending order. Implies --threads=1." }, - ["-T"] = { "Do not search files matching TYPE." }, - ["-F"] = { "Treat the pattern as a literal string." }, - ["--null"] = { "Print a NUL byte after file paths." }, - ["--column"] = { "Show column numbers." }, - ["--fixed-strings"] = { "Treat the pattern as a literal string." }, - ["--iglob"] = { "Include or exclude files case insensitively." }, + ["-0"] = { "Print a NUL byte after file paths." }, + ["--generate"] = { " arg", "Generate man pages and completion scripts." }, + ["--no-max-columns-preview"] = { "Show preview for lines exceeding the limit." }, + ["--no-one-file-system"] = { "Skip directories on other file systems." }, + ["-i"] = { "Case insensitive search." }, + ["--pre"] = { " arg", "Search output of COMMAND for each PATH." }, + ["--no-ignore-parent"] = { "Don't use ignore files in parent directories." }, + ["--no-byte-offset"] = { "Print the byte offset for each matching line." }, + ["-q"] = { "Do not print anything to stdout." }, + ["-H"] = { "Print the file path with each matching line." }, + ["--crlf"] = { "Use CRLF line terminators (nice for Windows)." }, + ["--unrestricted"] = { "Reduce the level of \"smart\" filtering." }, + ["--word-regexp"] = { "Show matches surrounded by word boundaries." }, + ["--context-separator"] = { " arg", "Set the separator for contextual chunks." }, + ["--hidden"] = { "Search hidden files and directories." }, + ["--smart-case"] = { "Smart case search." }, + ["-C"] = { " arg", "Show NUM lines before and after each match." }, + ["--pre-glob"] = { " arg", "Include or exclude files from a preprocessor." }, + ["--no-include-zero"] = { "Include zero matches in summary output." }, + ["--no-config"] = { "Never read configuration files." }, + ["--null-data"] = { "Use NUL as a line terminator." }, + ["-c"] = { "Show count of matching lines for each file." }, + ["--path-separator"] = { " arg", "Set the path separator for printing paths." }, + ["--max-count"] = { " arg", "Limit the number of matching lines." }, + ["--max-depth"] = { " arg", "Descend at most NUM directories." }, + ["--byte-offset"] = { "Print the byte offset for each matching line." }, + ["--color"] = { " arg", "When to use color." }, + ["--field-match-separator"] = { " arg", "Set the field match separator." }, + ["--text"] = { "Search binary files as if they were text." }, + ["-."] = { "Search hidden files and directories." }, + ["--ignore-files"] = { "Don't use --ignore-file arguments." }, + ["--case-sensitive"] = { "Search case sensitively (default)." }, + ["--help"] = { "Show help output." }, + ["-B"] = { " arg", "Show NUM lines before each match." }, + ["--no-ignore-global"] = { "Don't use global ignore files." }, + ["--no-heading"] = { "Print matches grouped by each file." }, + ["--auto-hybrid-regex"] = { "(DEPRECATED) Use PCRE2 if appropriate." }, + ["--max-filesize"] = { " arg", "Ignore files larger than NUM in size." }, + ["--ignore-exclude"] = { "Don't use local exclusion files." }, + ["--debug"] = { "Show debug messages." }, ["-s"] = { "Search case sensitively (default)." }, - ["--line-regexp"] = { "Only show matches surrounded by line boundaries." }, - ["--no-heading"] = { "Don't group matches by each file." }, - ["--sort-files"] = { "DEPRECATED" }, - ["--mmap"] = { "Search using memory maps when possible." }, - ["--include-zero"] = { "Include files with zero matches in summary" }, - ["--help"] = { "Prints help information. Use --help for more details." }, - ["--word-regexp"] = { "Only show matches surrounded by word boundaries." }, - ["-I"] = { "Never print the file path with the matched lines." }, - ["--with-filename"] = { "Print the file path with the matched lines." }, - ["--no-ignore"] = { "Don't respect ignore files." }, - ["-H"] = { "Print the file path with the matched lines." }, - ["--vimgrep"] = { "Show results in vim compatible format." }, - ["--trim"] = { "Trim prefixed whitespace from matches." }, + ["--line-buffered"] = { "Force line buffering." }, + ["--no-messages"] = { "Suppress some error messages." }, ["--files-with-matches"] = { "Print the paths with at least one match." }, - ["-a"] = { "Search binary files as if they were text." }, - ["--multiline"] = { "Enable matching across multiple lines." }, - ["--field-context-separator"] = { "Set the field context separator." }, - ["-A"] = { "Show NUM lines after each match." }, - ["--max-count"] = { "Limit the number of matches." }, - ["--color"] = { " arg", "Controls when to use color." }, - ["--no-ignore-exclude"] = { "Don't respect local exclusion files." }, - ["--quiet"] = { "Do not print anything to stdout." }, + ["--no-text"] = { "Search binary files as if they were text." }, + ["--no-sort-files"] = { "(DEPRECATED) Sort results by file path." }, + ["-E"] = { " arg", "Specify the text encoding of files to search." }, + ["--hyperlink-format"] = { " arg", "Set the format of hyperlinks." }, + ["--vimgrep"] = { "Print results im a vim compatible format." }, + ["--max-columns"] = { " arg", "Omit lines longer than this limit." }, + ["--sort-files"] = { "(DEPRECATED) Sort results by file path." }, + ["--pcre2-unicode"] = { "(DEPRECATED) Disable Unicode mode for PCRE2." }, + ["--multiline"] = { "Enable searching across multiple lines." }, + ["--no-ignore-files"] = { "Don't use --ignore-file arguments." }, + ["--no-filename"] = { "Never print the path with each matching line." }, + ["--no-stats"] = { "Print statistics about the search." }, + ["--glob-case-insensitive"] = { "Process all glob patterns case insensitively." }, + ["--no-line-number"] = { "Suppress line numbers." }, + ["-U"] = { "Enable searching across multiple lines." }, + ["--count-matches"] = { "Show count of every match for each file." }, + ["--hostname-bin"] = { " arg", "Run a program to get this system's hostname." }, + ["--no-pcre2-unicode"] = { "(DEPRECATED) Disable Unicode mode for PCRE2." }, + ["--version"] = { "Print ripgrep's version." }, + ["--with-filename"] = { "Print the file path with each matching line." }, + ["-V"] = { "Print ripgrep's version." }, + ["--context"] = { " arg", "Show NUM lines before and after each match." }, + ["--search-zip"] = { "Search in compressed files." }, ["--binary"] = { "Search binary files." }, - ["-v"] = { "Invert matching." }, - ["-b"] = { "Print the 0-based byte offset for each matching line." }, - ["--passthru"] = { "Print both matching and non-matching lines." }, + ["-M"] = { " arg", "Omit lines longer than this limit." }, + ["--type-clear"] = { " arg", "Clear globs for a file type." }, + ["--type-add"] = { " arg", "Add a new glob for a file type." }, + ["--type-not"] = { " arg", "Do not search files matching TYPE." }, + ["--heading"] = { "Print matches grouped by each file." }, + ["--no-crlf"] = { "Use CRLF line terminators (nice for Windows)." }, + ["--sort"] = { " arg", "Sort results in ascending order." }, + ["--type"] = { " arg", "Only search files matching TYPE." }, + ["-t"] = { " arg", "Only search files matching TYPE." }, + ["--no-trim"] = { "Trim prefix whitespace from matches." }, + ["--file"] = { " arg", "Search for patterns from the given file." }, + ["-p"] = { "Alias for colors, headings and line numbers." }, + ["--trace"] = { "Show trace messages." }, + ["--threads"] = { " arg", "Set the approximate number of threads to use." }, + ["--invert-match"] = { "Invert matching." }, + ["-j"] = { " arg", "Set the approximate number of threads to use." }, + ["-z"] = { "Search in compressed files." }, + ["--stats"] = { "Print statistics about the search." }, + ["--line-regexp"] = { "Show matches surrounded by line boundaries." }, + ["--before-context"] = { " arg", "Show NUM lines before each match." }, + ["--sortr"] = { " arg", "Sort results in descending order." }, + ["-T"] = { " arg", "Do not search files matching TYPE." }, + ["--replace"] = { " arg", "Replace matches with the given text." }, + ["-S"] = { "Smart case search." }, + ["-m"] = { " arg", "Limit the number of matching lines." }, + ["--no-json"] = { "Show search results in a JSON Lines format." }, + ["-b"] = { "Print the byte offset for each matching line." }, + ["--no-search-zip"] = { "Search in compressed files." }, ["--pcre2"] = { "Enable PCRE2 matching." }, + ["--no-column"] = { "Show column numbers." }, + ["-u"] = { "Reduce the level of \"smart\" filtering." }, + ["-L"] = { "Follow symbolic links." }, + ["--stop-on-nonmatch"] = { "Stop searching after a non-match." }, + ["-r"] = { " arg", "Replace matches with the given text." }, + ["--pretty"] = { "Alias for colors, headings and line numbers." }, + ["--unicode"] = { "Disable Unicode mode." }, + ["--regex-size-limit"] = { " arg", "The size limit of the compiled regex." }, + ["--fixed-strings"] = { "Treat all patterns as literals." }, + ["--trim"] = { "Trim prefix whitespace from matches." }, + ["--no-mmap"] = { "Search with memory maps when possible." }, + ["--no-pre"] = { "Search output of COMMAND for each PATH." }, + ["--pcre2-version"] = { "Print the version of PCRE2 that ripgrep uses." }, + ["--no-context-separator"] = { "Set the separator for contextual chunks." }, + ["-F"] = { "Treat all patterns as literals." }, ["-P"] = { "Enable PCRE2 matching." }, - ["--no-messages"] = { "Suppress some error messages." }, + ["--no-ignore"] = { "Don't use ignore files." }, + ["--no-line-buffered"] = { "Force line buffering." }, + ["-f"] = { " arg", "Search for patterns from the given file." }, + ["--no-block-buffered"] = { "Force block buffering." }, ["-o"] = { "Print only matched parts of a line." }, - ["--ignore-file"] = { "Specify additional ignore files." }, - ["--null-data"] = { "Use NUL as a line terminator instead of \n." }, - ["--no-ignore-vcs"] = { "Don't respect VCS ignore files." }, - ["-n"] = { "Show line numbers." }, - ["-B"] = { "Show NUM lines before each match." }, + ["--include-zero"] = { "Include zero matches in summary output." }, + ["--no-encoding"] = { "Specify the text encoding of files to search." }, + ["--no-multiline-dotall"] = { "Make '.' match line terminators." }, + ["--null"] = { "Print a NUL byte after file paths." }, ["--no-ignore-messages"] = { "Suppress gitignore parse error messages." }, - ["--no-ignore-global"] = { "Don't respect global ignore files." }, - ["--no-ignore-files"] = { "Don't respect --ignore-file arguments." }, - ["--path-separator"] = { "Set the path separator." }, - ["--sort"] = { " arg", "Sort results in ascending order. Implies --threads=1." }, - ["--text"] = { "Search binary files as if they were text." }, - ["--ignore-case"] = { "Case insensitive search." }, - ["--no-ignore-dot"] = { "Don't respect .ignore files." }, - ["--field-match-separator"] = { "Set the match separator." }, - ["--no-line-number"] = { "Suppress line numbers." }, - ["--after-context"] = { "Show NUM lines after each match." }, - ["--no-mmap"] = { "Never use memory maps." }, - ["-N"] = { "Suppress line numbers." }, - ["--hidden"] = { "Search hidden files and directories." }, - ["--ignore-file-case-insensitive"] = { "Process ignore files case insensitively." }, + ["-d"] = { " arg", "Descend at most NUM directories." }, + ["--ignore-dot"] = { "Don't use .ignore or .rgignore files." }, + ["-n"] = { "Show line numbers." }, + ["--no-multiline"] = { "Enable searching across multiple lines." }, + ["-v"] = { "Invert matching." }, + ["-l"] = { "Print the paths with at least one match." }, + ["--glob"] = { " arg", "Include or exclude file paths." }, + ["--count"] = { "Show count of matching lines for each file." }, + ["--require-git"] = { "Use .gitignore outside of git repositories." }, + ["--no-require-git"] = { "Use .gitignore outside of git repositories." }, + ["--one-file-system"] = { "Skip directories on other file systems." }, + ["--iglob"] = { " arg", "Include/exclude paths case insensitively." }, + ["--mmap"] = { "Search with memory maps when possible." }, + ["--no-glob-case-insensitive"] = { "Process all glob patterns case insensitively." }, + ["--field-context-separator"] = { " arg", "Set the field context separator." }, + ["--no-invert-match"] = { "Invert matching." }, + ["--encoding"] = { " arg", "Specify the text encoding of files to search." }, + ["--ignore-vcs"] = { "Don't use ignore files from source control." }, + ["--no-ignore-vcs"] = { "Don't use ignore files from source control." }, + ["--ignore-messages"] = { "Suppress gitignore parse error messages." }, + ["--no-fixed-strings"] = { "Treat all patterns as literals." }, + ["--no-ignore-file-case-insensitive"] = { "Process ignore files case insensitively." }, + ["-e"] = { " arg", "A pattern to search for." }, + ["--no-ignore-dot"] = { "Don't use .ignore or .rgignore files." }, ["--files-without-match"] = { "Print the paths that contain zero matches." }, - ["--type-add"] = { "Add a new glob for a file type." }, - ["-."] = { "Search hidden files and directories." }, - ["--byte-offset"] = { "Print the 0-based byte offset for each matching line." }, + ["-g"] = { " arg", "Include or exclude file paths." }, + ["--no-binary"] = { "Search binary files." }, + ["--no-ignore-exclude"] = { "Don't use local exclusion files." }, + ["--dfa-size-limit"] = { " arg", "The upper size limit of the regex DFA." }, + ["--regexp"] = { " arg", "A pattern to search for." }, + ["--ignore"] = { "Don't use ignore files." }, + ["--files"] = { "Print each file that would be searched." }, + ["--block-buffered"] = { "Force block buffering." }, + ["--no-unicode"] = { "Disable Unicode mode." }, + ["--max-columns-preview"] = { "Show preview for lines exceeding the limit." }, + ["-x"] = { "Show matches surrounded by line boundaries." }, + ["--ignore-file"] = { " arg", "Specify additional ignore files." }, + ["-w"] = { "Show matches surrounded by word boundaries." }, + ["--engine"] = { " arg", "Specify which regex engine to use." }, + ["--no-follow"] = { "Follow symbolic links." }, + ["--follow"] = { "Follow symbolic links." }, + ["--column"] = { "Show column numbers." }, + ["-N"] = { "Suppress line numbers." }, + ["--no-pcre2"] = { "Enable PCRE2 matching." }, }) :addflags({ - "-A", - "--after-context", - "-B", - "--before-context", - "--color"..rg_color, - "--colors", - "-C", - "--context", - "--context-separator", - "--dfa-size-limit", - "-E", - "--encoding", - "--engine"..rg_engine, - "--field-context-separator", - "--field-match-separator", - "-f", - "--file", - "-g", - "--glob", - "--iglob", - "--ignore-file", - "-M", - "--max-columns", - "-m", - "--max-count", - "--max-depth", - "--max-filesize", - "--path-separator", - "--pre", - "--pre-glob", - "--regex-size-limit", - "-e", - "--regexp", - "-r", - "--replace", - "--sort"..rg_sort, - "--sortr"..rg_sortr, - "-j", - "--threads", - "-t", - "--type", - "--type-add", - "--type-clear", - "-T", - "--type-not", - "--auto-hybrid-regex", - "--no-auto-hybrid-regex", + "-e"..rg_regexp, + "--regexp"..rg_regexp, + "-f"..rg_file, + "--file"..rg_file, + "-A"..rg_aftercontext, + "--after-context"..rg_aftercontext, + "-B"..rg_beforecontext, + "--before-context"..rg_beforecontext, "--binary", "--no-binary", "--block-buffered", "--no-block-buffered", "-b", "--byte-offset", + "--no-byte-offset", "-s", "--case-sensitive", + "--color"..rg_color, + "--colors"..rg_colors, "--column", "--no-column", + "-C"..rg_context, + "--context"..rg_context, + "--context-separator"..rg_contextseparator, "--no-context-separator", "-c", "--count", @@ -223,8 +267,13 @@ clink.argmatcher("rg") "--crlf", "--no-crlf", "--debug", - "--trace", + "--dfa-size-limit"..rg_dfasizelimit, + "-E"..rg_encoding, + "--encoding"..rg_encoding, "--no-encoding", + "--engine"..rg_engine, + "--field-context-separator"..rg_fieldcontextseparator, + "--field-match-separator"..rg_fieldmatchseparator, "--files", "-l", "--files-with-matches", @@ -235,20 +284,31 @@ clink.argmatcher("rg") "-L", "--follow", "--no-follow", + "--generate"..rg_generate, + "-g"..rg_glob, + "--glob"..rg_glob, "--glob-case-insensitive", "--no-glob-case-insensitive", "--heading", "--no-heading", + "-h", + "--help", "-.", "--hidden", "--no-hidden", + "--hostname-bin"..rg_hostnamebin, + "--hyperlink-format"..rg_hyperlinkformat, + "--iglob"..rg_iglob, "-i", "--ignore-case", + "--ignore-file"..rg_ignorefile, "--ignore-file-case-insensitive", "--no-ignore-file-case-insensitive", "--include-zero", + "--no-include-zero", "-v", "--invert-match", + "--no-invert-match", "--json", "--no-json", "--line-buffered", @@ -259,8 +319,15 @@ clink.argmatcher("rg") "--no-line-number", "-x", "--line-regexp", + "-M"..rg_maxcolumns, + "--max-columns"..rg_maxcolumns, "--max-columns-preview", "--no-max-columns-preview", + "-m"..rg_maxcount, + "--max-count"..rg_maxcount, + "-d"..rg_maxdepth, + "--max-depth"..rg_maxdepth, + "--max-filesize"..rg_maxfilesize, "--mmap", "--no-mmap", "-U", @@ -287,8 +354,6 @@ clink.argmatcher("rg") "--ignore-vcs", "--no-messages", "--messages", - "--no-pcre2-unicode", - "--pcre2-unicode", "--no-require-git", "--require-git", "--no-unicode", @@ -300,33 +365,51 @@ clink.argmatcher("rg") "--no-one-file-system", "-o", "--only-matching", + "--path-separator"..rg_pathseparator, "--passthru", "-P", "--pcre2", "--no-pcre2", "--pcre2-version", + "--pre"..rg_pre, "--no-pre", + "--pre-glob"..rg_preglob, "-p", "--pretty", "-q", "--quiet", + "--regex-size-limit"..rg_regexsizelimit, + "-r"..rg_replace, + "--replace"..rg_replace, "-z", "--search-zip", "--no-search-zip", "-S", "--smart-case", - "--sort-files", - "--no-sort-files", + "--sort"..rg_sort, + "--sortr"..rg_sortr, "--stats", "--no-stats", + "--stop-on-nonmatch", "-a", "--text", "--no-text", + "-j"..rg_threads, + "--threads"..rg_threads, + "--trace", "--trim", "--no-trim", + "-t"..rg_type, + "--type"..rg_type, + "-T"..rg_typenot, + "--type-not"..rg_typenot, + "--type-add"..rg_typeadd, + "--type-clear"..rg_typeclear, "--type-list", "-u", "--unrestricted", + "-V", + "--version", "--vimgrep", "-H", "--with-filename", @@ -334,8 +417,10 @@ clink.argmatcher("rg") "--no-filename", "-w", "--word-regexp", - "-h", - "--help", - "-V", - "--version", + "--auto-hybrid-regex", + "--no-auto-hybrid-regex", + "--no-pcre2-unicode", + "--pcre2-unicode", + "--sort-files", + "--no-sort-files", })