#compdef ug ug+ ugrep ugrep+

# zsh completions for 'ugrep'
# Autogenerated from ugrep --help

local matchers='(--extended-regexp --fixed-strings --basic-regexp --perl-regexp --fuzzy -E -F -G -P -Z)'
local arguments=(
'(-e --regexp -f --file)1: :_guard "^-*" pattern'
'*: :_files'
{-A,--after-context=-}'[Output NUM lines of trailing context after matching lines]:NUM:( )'
{-a,--text}'[Process a binary file as if it were text]'
{--all,-@}'[Search all files except hidden: cancel previous file and directory search restrictions and cancel --ignore-binary and --ignore-files when specified]'
'(1)*'--and'[Specify additional PATTERN that must match]'
'(1)*'--andnot'[Combines --and --not]'
{-B,--before-context=-}'[Output NUM lines of leading context before matching lines]:NUM:( )'
{-b,--byte-offset}'[The offset in bytes of a pattern match is displayed in front of the respective matched line]'
--binary-files=-'[Controls searching and reporting pattern matches in binary files]'
{--bool,-%,-%%}'[Specifies Boolean query patterns]'
--break'[Adds a line break between results from different files]'
{-C,--context=-}'[Output NUM lines of leading and trailing context surrounding each matching line]:NUM:( )'
{-c,--count}'[Only a count of selected lines is written to standard output]'
{--color,--colour}'[Mark up the matching text with the colors specified with option --colors or the GREP_COLOR or GREP_COLORS environment variable]'
{--colors=-,--colours=-}'[Use COLORS to mark up text]'
{--config,---}'[Use configuration FILE]'
--no-config'[Do not automatically load the default .ugrep configuration file]'
--no-confirm'[Do not confirm actions in -Q query TUI]'
--cpp'[Output file matches in C++]'
--csv'[Output file matches in CSV]'
{-D,--devices=-}'[If an input file is a device, FIFO or socket, use ACTION to process it]:ACTION:(read skip)'
{-d,--directories=-}'[If an input file is a directory, use ACTION to process it]:ACTION:(read recurse skip)'
--delay=-'[Set the default -Q key response delay]'
{--depth=-,-1,-2,-3,-9,-10,-11}'[Restrict recursive searches from MIN to MAX directory levels deep, where -1 (--depth=1) searches the specified path without recursing into subdirectories]'
--dotall'[Dot . in regular expressions matches anything, including newline]'
$matchers{-E,--extended-regexp}'[Interpret patterns as extended regular expressions (EREs)]'
'(1)*'{-e,--regexp=-}'[Specify a PATTERN to search the input]:PATTERN:( )'
--encoding=-'[The encoding format of the input]:ENCODING:(binary ASCII UTF-8 UTF-16 UTF-16BE UTF-16LE UTF-32 UTF-32BE UTF-32LE LATIN1 ISO-8859-1 ISO-8859-2 ISO-8859-3 ISO-8859-4 ISO-8859-5 ISO-8859-6 ISO-8859-7 ISO-8859-8 ISO-8859-9 ISO-8859-10 ISO-8859-11 ISO-8859-13 ISO-8859-14 ISO-8859-15 ISO-8859-16 MAC MACROMAN EBCDIC CP437 CP850 CP858 CP1250 CP1251 CP1252 CP1253 CP1254 CP1255 CP1256 CP1257 CP1258 KOI8-R KOI8-U KOI8-RU null-data )'
'(1)*'--exclude=-'[Exclude files whose name matches GLOB, same as -g ^GLOB]'
'(1)*'--exclude-dir=-'[Exclude directories whose name matches GLOB from recursive searches, same as -g ^GLOB/]'
'(1)*'--exclude-from=-'[Read the globs from FILE and skip files and directories whose name matches one or more globs]'
'(1)*'--exclude-fs=-'[Exclude file systems specified by MOUNTS from recursive searches]'
$matchers{-F,--fixed-strings}'[Interpret pattern as a set of fixed strings, separated by newlines, any of which is to be matched]'
'(1)*'{-f,--file=-}'[Read newline-separated patterns from FILE]:FILE:_files'
{--files,-%%}'[Boolean file matching mode, the opposite of --lines]'
--filter=-'[Filter files through the specified COMMANDS first before searching]'
--filter-magic-label=-'[Associate LABEL with files whose signature "magic bytes" match the MAGIC regex pattern]'
--format=-'[Output FORMAT-formatted matches]'
--free-space'[Spacing (blanks and tabs) in regular expressions are ignored]'
--from=-'[Read additional pathnames of files to search from FILE]'
$matchers{-G,--basic-regexp}'[Interpret patterns as basic regular expressions (BREs)]'
'(1)*'{-g,--glob=-,--iglob=-}'[Only search files whose name matches the specified comma-separated list of GLOBS, same as --include=glob for each glob in GLOBS]:GLOB:( )'
--glob-ignore-case'[Perform case-insensitive glob matching in general]'
--group-separator'[Use SEP as a group separator for context options -A, -B and -C]'
--no-group-separator'[Removes the group separator line from the output for context options -A, -B and -C]'
{-H,--with-filename}'[Always print the filename with output lines]'
{-h,--no-filename}'[Never print filenames with output lines]'
{--heading,-+}'[Group matches per file]'
'(-)'{--help,-?}'[Display a help message on options related to WHAT when specified]'
--hexdump=-'[Output matches in 1 to 8 columns of 8 hexadecimal octets]:NUM:(1a 2a 4ah 6ah 8ah 1aC1 2aC1 4ahC1 6ahC1 8ahC1)'
{--hidden,-.}'[Search hidden files and directories (enabled by default in grep compatibility mode)]'
--hyperlink'[Hyperlinks are enabled for file names when colors are enabled]'
{-I,--ignore-binary}'[Ignore matches in binary files]'
{-i,--ignore-case}'[Perform case insensitive matching]'
'(1)*'--ignore-files'[Ignore files and directories matching the globs in each FILE that is encountered in recursive searches]'
--no-ignore-files'[Do not ignore files, i.e. cancel --ignore-files when specified]'
'(1)*'--include=-'[Only search files whose name matches GLOB, same as -g GLOB]'
'(1)*'--include-dir=-'[Only directories whose name matches GLOB are included in recursive searches, same as -g GLOB/]'
'(1)*'--include-from=-'[Read the globs from FILE and search only files and directories whose name matches one or more globs]'
'(1)*'--include-fs=-'[Only file systems specified by MOUNTS are included in recursive searches]'
--index'[Perform fast index-based recursive search]'
{-J,--jobs=-}'[Specifies the number of threads spawned to search files]:NUM:( )'
{-j,--smart-case}'[Perform case insensitive matching, unless a pattern is specified with a literal upper case letter]'
--json'[Output file matches in JSON]'
{-K,--range=-,--min-line=-,--max-line=-}'[Start searching at line MIN, stop at line MAX when specified]:MIN,MAX:( )'
{-k,--column-number}'[The column number of a pattern match is displayed in front of the respective matched line, starting at column 1]'
{-L,--files-without-match}'[Only the names of files not containing selected lines are written to standard output]'
{-l,--files-with-matches}'[Only the names of files containing selected lines are written to standard output]'
--label=-'[Displays the LABEL value when input is read from standard input where a file name would normally be printed in the output]'
--line-buffered'[Force output to be line buffered instead of block buffered]'
--lines'[Boolean line matching mode for option --bool, the default mode]'
'(1)*'{-M,--file-magic=-}'[Only search files matching the magic signature pattern MAGIC]:PATTERN:( )'
{-m,--min-count=-,--max-count=-}'[Require MIN matches, stop after MAX matches when specified]:MIN,MAX:( )::(1 1, 1,10)'
--match'[Match all lines]'
--max-files=-'[Restrict the number of files matched to NUM]'
--max-size=-'[Only search files whose physical size does not exceed MAX bytes]'
--min-size=-'[Only search files whose physical size equals or exceeds MIN bytes]'
--mmap'[Use memory maps to search files]'
{-N,--neg-regexp=-}'[Specify a negative PATTERN to reject specific -e PATTERN matches with a counter pattern]:PATTERN:( )'
{-n,--line-number}'[Each output line is preceded by its relative line number in the file, starting at line 1]'
--not'[Specifies that PATTERN should not match]'
{--null,-0}'[Output a zero byte after the file name]'
{--null-data,-00}'[Input and output are treated as sequences of lines with each line terminated by a zero byte instead of a newline; effectively swaps NUL with LF in the input and the output]'
'(1)*'{-O,--file-extension=-}'[Only search files whose filename extensions match the specified comma-separated list of EXTENSIONS, same as -g *.ext for each]:EXT:( )'
{-o,--only-matching}'[Only the matching part of a pattern match is output]'
--only-line-number'[Only the line number of a matching line is output]'
$matchers{-P,--perl-regexp}'[Interpret PATTERN as a Perl regular expression using PCRE2]'
{-p,--no-dereference}'[If -R or -r is specified, do not follow symbolic links, even when symbolic links are specified on the command line]'
--pager'[When output is sent to the terminal, uses COMMAND to page through the output]'
--pretty'[When output is sent to the terminal, enables options --color, --heading, -n, --sort, --tree and -T when not explicitly disabled]'
{-Q,--query}'[Query mode: start a TUI to perform interactive searches]'
{-q,--quiet,--silent}'[Quiet mode: suppress all output]'
{-R,--dereference-recursive}'[Recursively read all files under each directory, following symbolic links to files and directories, unlike -r]'
{-r,--recursive}'[Recursively read all files under each directory, following symbolic links only if they are on the command line]'
--replace=-'[Replace matching patterns in the output by FORMAT with % fields]'
{-S,--dereference-files}'[When -r is specified, follow symbolic links to files, but not to directories]'
{-s,--no-messages}'[Silent mode: nonexistent and unreadable files are ignored and their error messages and warnings are suppressed]'
--save-config'[Save configuration FILE to include OPTIONS]'
{--separator,--context-separator=-}'[Use SEP as field separator between file name, line number, column number, byte offset and the matched line]'
--split'[Split the -Q query TUI screen on startup]'
--sort=-'[Displays matching files in the order specified by KEY in recursive searches]:KEY:(name best size changed created used rname rbest rsize rchanged rcreated rused)'
--stats'[Output statistics on the number of files and directories searched and the inclusion and exclusion constraints applied]'
{-T,--initial-tab}'[Add a tab space to separate the file name, line number, column number and byte offset with the matched line]'
'(1)*'{-t,--file-type=-}'[Search only files associated with TYPES, a comma-separated list of file types]:TYPES:(actionscript ada adoc asm asp aspx autoconf automake awk Awk basic batch bison c c++ clojure cpp csharp css csv dart Dart delphi elisp elixir erlang fortran gif Gif go groovy gsp haskell html jade java jpeg Jpeg js json jsp julia kotlin less lex lisp lua m4 make markdown matlab node Node objc objc++ ocaml parrot pascal pdf Pdf perl Perl php Php png Png prolog python Python r rpm Rpm rst rtf Rtf ruby Ruby rust scala scheme seed7 shell Shell smalltalk sql svg swift tcl tex text tiff Tiff tt typescript verilog vhdl vim xml Xml yacc yaml zig )'
--tabs'[Set the tab size to NUM to expand tabs for option -k]'
--tag'[Disables colors to mark up matches with TAG]'
{--tree,-'^'}'[Output directories with matching files in a tree-like format for option -c or --count, -l or --files-with-matches, -L or --files-without-match]'
{-U,--ascii,--binary}'[Disables Unicode matching for ASCII and binary matching]'
{-u,--ungroup}'[Do not group multiple pattern matches on the same matched line]'
{-V,--version}'[Display version with linked libraries and exit]'
{-v,--invert-match}'[Selected lines are those not matching any of the specified patterns]'
--view'[Use COMMAND to view/edit a file in -Q query TUI by pressing CTRL-Y]'
{-W,--with-hex}'[Output binary matches in hexadecimal, leaving text matches alone]'
{-w,--word-regexp}'[The PATTERN is searched for as a word, such that the matching text is preceded by a non-word character and is followed by a non-word character]'
--width'[Truncate the output to NUM visible characters per line]'
{-X,--hex}'[Output matches and matching lines in hexadecimal]'
{-x,--line-regexp}'[Select only those matches that exactly match the whole line, as if the patterns are surrounded by ^ and $]'
--xml'[Output file matches in XML]'
{-Y,--empty}'[Empty-matching patterns match all lines]'
{-y,--any-line,--passthru}'[Any line is output (passthru)]'
$matchers{-Z-,--fuzzy=-}'[Fuzzy mode: report approximate pattern matches within MAX errors]:DIST:(1 +1 -1 \~1 +-1 +~1 +-~1 -~1 best1 best+1 best-1 best~1 best+-1 best+~1 best+-~1 best-~1)'
{-z,--decompress}'[Search compressed files and archives]'
--zmax=-'[When used with option -z or --decompress, searches the contents of compressed files and archives stored within archives by up to NUM expansion stages]'
)
_arguments -s -S $arguments
