{
    "mode": "man",
    "parameter": "ACK",
    "section": "1p",
    "url": "https://www.chedong.com/phpMan.php/man/ACK/1p/json",
    "generated": "2026-08-29T00:12:51Z",
    "synopsis": "ack [options] PATTERN [FILE...]\nack -f [options] [DIRECTORY...]",
    "sections": {
        "NAME": {
            "content": "ack - grep-like text finder\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "ack [options] PATTERN [FILE...]\nack -f [options] [DIRECTORY...]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "ack is designed as an alternative to grep for programmers.\n\nack searches the named input FILEs or DIRECTORYs for lines containing a match to the given\nPATTERN.  By default, ack prints the matching lines.  If no FILE or DIRECTORY is given, the\ncurrent directory will be searched.\n\nPATTERN is a Perl regular expression.  Perl regular expressions are commonly found in other\nprogramming languages, but for the particulars of their behavior, please consult perlreref\n<https://perldoc.perl.org/perlreref.html>.  If you don't know how to use regular expression\nbut are interested in learning, you may consult perlretut\n<https://perldoc.perl.org/perlretut.html>.  If you do not need or want ack to use regular\nexpressions, please see the \"-Q\"/\"--literal\" option.\n\nAck can also list files that would be searched, without actually searching them, to let you\ntake advantage of ack's file-type filtering capabilities.\n",
            "subsections": []
        },
        "FILE SELECTION": {
            "content": "If files are not specified for searching, either on the command line or piped in with the\n\"-x\" option, ack delves into subdirectories selecting files for searching.\n\nack is intelligent about the files it searches.  It knows about certain file types, based on\nboth the extension on the file and, in some cases, the contents of the file.  These\nselections can be made with the --type option.\n\nWith no file selection, ack searches through regular files that are not explicitly excluded\nby --ignore-dir and --ignore-file options, either present in ackrc files or on the command\nline.\n\nThe default options for ack ignore certain files and directories.  These include:\n\n•   Backup files: Files matching #*# or ending with ~.\n\n•   Coredumps: Files matching core.\\d+\n\n•   Version control directories like .svn and .git.\n\nRun ack with the \"--dump\" option to see what settings are set.\n\nHowever,  ack  always  searches the files given on the command line, no matter what type.  If\nyou tell ack to search in a coredump, it will search in a coredump.\n",
            "subsections": []
        },
        "DIRECTORY SELECTION": {
            "content": "ack descends through the directory  tree  of  the  starting  directories  specified.   If  no\ndirectories  are  specified,  the current working directory is used.  However, it will ignore\nthe shadow directories used by many version control systems, and the build  directories  used\nby  the  Perl  MakeMaker  system.   You may add or remove a directory from this list with the\n--[no]ignore-dir option. The option may be repeated to add/remove multiple  directories  from\nthe ignore list.\n\nFor a complete list of directories that do not get searched, run \"ack --dump\".\n",
            "subsections": []
        },
        "MATCHING IN A RANGE OF LINES": {
            "content": "The  \"--range-start\"  and  \"--range-end\"  options  let  you specify ranges of lines to search\nwithin each file.\n\nSay you had the following file, called testfile:\n\n# This function calls print on \"foo\".\nsub foo {\nprint 'foo';\n}\nmy $print = 1;\nsub bar {\nprint 'bar';\n}\nmy $task = 'print';\n\nCalling \"ack print\" will give us five matches:\n\n$ ack print testfile\n# This function calls print on \"foo\".\nprint 'foo';\nmy $print = 1;\nprint 'bar';\nmy $task = 'print';\n\nWhat if we only want to search for \"print\" within the subroutines?  We can specify ranges  of\nlines  that  we  want ack to search.  The range starts with any line that matches the pattern\n\"^sub \\w+\", and stops with any line that matches \"^}\".\n\n$ ack --range-start='^sub \\w+' --range-end='^}' print testfile\nprint 'foo';\nprint 'bar';\n\nNote that ack searched two ranges of lines.  The listing below shows which lines  were  in  a\nrange and which were out of the range.\n\nOut # This function calls print on \"foo\".\nIn  sub foo {\nIn      print 'foo';\nIn  }\nOut my $print = 1;\nIn  sub bar {\nIn      print 'bar';\nIn  }\nOut my $task = 'print';\n\nYou  don't  have  to  specify  both \"--range-start\" and \"--range-end\".  IF \"--range-start\" is\nomitted, then the range runs from the first line in  the  file  until  the  first  line  that\nmatches \"--range-end\".  Similarly, if \"--range-end\" is omitted, the range runs from the first\nline matching \"--range-start\" to the end of the file.\n\nFor  example,  if  you  wanted  to  search  all HTML files up until the first instance of the\n\"<body>\", you could do\n\nack foo --html --range-end='<body>'\n\nOr to search after Perl's `DATA` or `END` markers, you would do\n\nack pattern --perl --range-start='^(END|DATA)'\n\nIt's possible for a range to start and stop on the same line.  For example\n\n--range-start='<title>' --range-end='</title>'\n\nwould match this line as both the start and end of the range, making a one-line range.\n\n<title>Page title</title>\n\nNote that the patterns in \"--range-start\" and \"--range-end\" are not affected by options  like\n\"-i\", \"-w\" and \"-Q\" that modify the behavior of the main pattern being matched.\n\nAgain,  ranges  only  affect  where matches are looked for.  Everything else in ack works the\nsame way.  Using \"-c\" option with a range will give a count of all the  matches  that  appear\nwithin  those  ranges.   The \"-l\" shows those files that have a match within a range, and the\n\"-L\" option shows files that do not have a match within a range.\n\nThe \"-v\" option for negating a match works inside the range, too.  To see  lines  that  don't\nmatch \"google\" within the \"<head>\" section of your HTML files, you could do:\n\nack google -v --html --range-start='<head' --range-end='</head>'\n\nSpecifying  a  range  to search does not affect how matches are displayed.  The context for a\nmatch will still be the same, and\n\nUsing the context options work the same way, and will show context lines for matches even  if\nthe context lines fall outside the range.  Similarly, \"--passthru\" will show all lines in the\nfile, but only show matches for lines within the range.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "--ackrc",
                    "content": "Specifies an ackrc file to load after all others; see \"ACKRC LOCATION SEMANTICS\".\n",
                    "long": "--ackrc"
                },
                {
                    "name": "-A _NUM_ --after-context=\u001b[4mNUM",
                    "content": "Print NUM lines of trailing context after matching lines.\n",
                    "flag": "-A",
                    "long": "--after-context",
                    "arg": "\u001b[4mNUM"
                },
                {
                    "name": "-B _NUM_ --before-context=\u001b[4mNUM",
                    "content": "Print NUM lines of leading context before matching lines.\n",
                    "flag": "-B",
                    "long": "--before-context",
                    "arg": "\u001b[4mNUM"
                },
                {
                    "name": "--[no]break",
                    "content": "Print   a   break  between  results  from  different  files.  On  by  default  when  used\ninteractively.\n"
                },
                {
                    "name": "-C [_NUM_] --context[=_NUM_]",
                    "content": "Print NUM lines (default 2) of context around matching lines.  You can specify zero lines\nof context to override another context specified in an ackrc.\n",
                    "flag": "-C",
                    "arg": "[_NUM_]"
                },
                {
                    "name": "-c --count",
                    "content": "Suppress normal output; instead print a count of matching lines for each input file.   If\n-l  is  in  effect,  it  will  only show the number of lines for each file that has lines\nmatching.  Without -l, some line counts may be zeroes.\n\nIf combined with -h (--no-filename) ack outputs only one total count.\n\n--[no]color, --[no]colour\n--color highlights the matching text.  --nocolor suppresses the color.   This  is  on  by\ndefault unless the output is redirected.\n\nOn  Windows,  this  option  is  off  by default unless the Win32::Console::ANSI module is\ninstalled or the \"ACKPAGERCOLOR\" environment variable is used.\n",
                    "flag": "-c",
                    "long": "--count"
                },
                {
                    "name": "--color-filename=\u001b[4mcolor",
                    "content": "Sets the color to be used for filenames.\n",
                    "long": "--color-filename",
                    "arg": "\u001b[4mcolor"
                },
                {
                    "name": "--color-match=\u001b[4mcolor",
                    "content": "Sets the color to be used for matches.\n",
                    "long": "--color-match",
                    "arg": "\u001b[4mcolor"
                },
                {
                    "name": "--color-colno=\u001b[4mcolor",
                    "content": "Sets the color to be used for column numbers.\n",
                    "long": "--color-colno",
                    "arg": "\u001b[4mcolor"
                },
                {
                    "name": "--color-lineno=\u001b[4mcolor",
                    "content": "Sets the color to be used for line numbers.\n",
                    "long": "--color-lineno",
                    "arg": "\u001b[4mcolor"
                },
                {
                    "name": "--[no]column",
                    "content": "Show the column number of the first match.  This is helpful for editors  that  can  place\nyour cursor at a given position.\n"
                },
                {
                    "name": "--create-ackrc",
                    "content": "Dumps  the  default  ack options to standard output.  This is useful for when you want to\ncustomize the defaults.\n",
                    "long": "--create-ackrc"
                },
                {
                    "name": "--dump",
                    "content": "Writes the list of options loaded and where they came from to standard output.  Handy for\ndebugging.\n",
                    "long": "--dump"
                },
                {
                    "name": "--[no]env",
                    "content": "--noenv disables all environment processing.  No  .ackrc  is  read  and  all  environment\nvariables are ignored. By default, ack considers .ackrc and settings in the environment.\n"
                },
                {
                    "name": "--flush",
                    "content": "--flush  flushes  output  immediately.   This  is  off  by  default unless ack is running\ninteractively (when output goes to a pipe or file).\n",
                    "long": "--flush"
                },
                {
                    "name": "-f",
                    "content": "PATTERN must not be specified, or it will be taken as a path to search.\n",
                    "flag": "-f"
                },
                {
                    "name": "--files-from=\u001b[4mFILE",
                    "content": "The  list  of files to be searched is specified in FILE.  The list of files are separated\nby newlines.  If FILE is \"-\", the list is loaded from standard input.\n\nNote that the list of files is not filtered in any way.   If  you  add  \"--type=html\"  in\naddition to \"--files-from\", the \"--type\" will be ignored.\n",
                    "long": "--files-from",
                    "arg": "\u001b[4mFILE"
                },
                {
                    "name": "--[no]filter",
                    "content": "Forces ack to act as if it were receiving input via a pipe.\n"
                },
                {
                    "name": "--[no]follow",
                    "content": "Follow  or  don't follow symlinks, other than whatever starting files or directories were\nspecified on the command line.\n\nThis is off by default.\n"
                },
                {
                    "name": "-g \u001b[4mPATTERN",
                    "content": "Print searchable files where the relative path + filename matches PATTERN.\n\nNote that\n\nack -g foo\n\nis exactly the same as\n\nack -f | ack foo\n\nThis means that just as ack will not search, for example, .jpg files, \"-g\" will not  list\n.jpg files either.  ack is not intended to be a general-purpose file finder.\n\nNote  also  that if you have \"-i\" in your .ackrc that the filenames to be matched will be\ncase-insensitive as well.\n\nThis option can be combined with --color to make it easier to spot the match.\n",
                    "flag": "-g"
                },
                {
                    "name": "--[no]group",
                    "content": "--group groups matches by file name.  This is the default when used interactively.\n\n--nogroup prints one result per line, like grep.  This is  the  default  when  output  is\nredirected.\n"
                },
                {
                    "name": "-H --with-filename",
                    "content": "Print  the  filename  for  each  match.  This  is  the  default unless searching a single\nexplicitly specified file.\n",
                    "flag": "-H",
                    "long": "--with-filename"
                },
                {
                    "name": "-h --no-filename",
                    "content": "Suppress the prefixing of filenames on output when multiple files are searched.\n",
                    "flag": "-h",
                    "long": "--no-filename"
                },
                {
                    "name": "--[no]heading",
                    "content": "Print a filename heading above each file's  results.   This  is  the  default  when  used\ninteractively.\n"
                },
                {
                    "name": "--help",
                    "content": "Print a short help statement.\n",
                    "long": "--help"
                },
                {
                    "name": "--help-types",
                    "content": "Print all known types.\n",
                    "long": "--help-types"
                },
                {
                    "name": "--help-colors",
                    "content": "Print a chart of various color combinations.\n",
                    "long": "--help-colors"
                },
                {
                    "name": "--help-rgb-colors",
                    "content": "Like --help-colors but with more precise RGB colors.\n",
                    "long": "--help-rgb-colors"
                },
                {
                    "name": "-i --ignore-case",
                    "content": "Ignore case distinctions in PATTERN.  Overrides --smart-case and -I.\n",
                    "flag": "-i",
                    "long": "--ignore-case"
                },
                {
                    "name": "-I --no-ignore-case",
                    "content": "Turns on case distinctions in PATTERN.  Overrides --smart-case and -i.\n",
                    "flag": "-I",
                    "long": "--no-ignore-case"
                },
                {
                    "name": "--ignore-ack-defaults",
                    "content": "Tells ack to completely ignore the default definitions provided with ack.  This is useful\nin combination with --create-ackrc if you really want to customize ack.\n\n--[no]ignore-dir=DIRNAME, --[no]ignore-directory=\u001b[4mDIRNAME\nIgnore  directory  (as  CVS, .svn, etc are ignored). May be used multiple times to ignore\nmultiple directories. For example, mason users may wish to include --ignore-dir=data. The\n--noignore-dir option allows users to search directories which would normally be  ignored\n(perhaps to research the contents of .svn/props directories).\n\nThe  DIRNAME  must always be a simple directory name. Nested directories like foo/bar are\nNOT supported. You would need to specify --ignore-dir=foo and then no files from any  foo\ndirectory are taken into account by ack unless given explicitly on the command line.\n",
                    "long": "--ignore-ack-defaults"
                },
                {
                    "name": "--ignore-file=\u001b[4mFILTER:ARGS",
                    "content": "Ignore  files  matching  FILTER:ARGS.  The filters are specified identically to file type\nfilters as seen in \"Defining your own types\".\n",
                    "long": "--ignore-file",
                    "arg": "\u001b[4mFILTER:ARGS"
                },
                {
                    "name": "-k --known-types",
                    "content": "Limit selected files to those with types that ack knows about.\n",
                    "flag": "-k",
                    "long": "--known-types"
                },
                {
                    "name": "-l --files-with-matches",
                    "content": "Only print the filenames of matching files, instead of the matching text.\n",
                    "flag": "-l",
                    "long": "--files-with-matches"
                },
                {
                    "name": "-L --files-without-matches",
                    "content": "Only print the filenames of files that do NOT match.\n",
                    "flag": "-L",
                    "long": "--files-without-matches"
                },
                {
                    "name": "--match \u001b[4mPATTERN",
                    "content": "Specify the PATTERN explicitly. This is helpful if you don't want to  put  the  regex  as\nyour first argument, e.g. when executing multiple searches over the same set of files.\n\n# search for foo and bar in given files\nack file1 t/file* --match foo\nack file1 t/file* --match bar\n",
                    "long": "--match"
                },
                {
                    "name": "-m=_NUM_ --max-count=\u001b[4mNUM",
                    "content": "Print  only  NUM  matches  out  of each file.  If you want to stop ack after printing the\nfirst match of any kind, use the -1 options.\n",
                    "long": "--max-count",
                    "arg": "\u001b[4mNUM"
                },
                {
                    "name": "--man",
                    "content": "Print this manual page.\n",
                    "long": "--man"
                },
                {
                    "name": "-n --no-recurse",
                    "content": "No descending into subdirectories.\n",
                    "flag": "-n",
                    "long": "--no-recurse"
                },
                {
                    "name": "--not=PATTERN",
                    "content": "Specifies a PATTERN that must NOT me true on a given line for  a  match  to  occur.  This\noption can be repeated.\n\nIf  you  want to find all the lines with \"dogs\" but not if \"cats\" or \"fish\" appear on the\nline, use:\n\nack dogs --not cats --not fish\n\nNote that the options that affect \"dogs\" also affect \"cats\" and \"fish\", so if you have\n\nack -i -w dogs --not cats\n\nthe the search for both \"dogs\" and \"cats\" will be case-insensitive and be word-limited.\n",
                    "long": "--not",
                    "arg": "PATTERN"
                },
                {
                    "name": "-o",
                    "content": "exactly the same as \"--output=$&\".\n",
                    "flag": "-o"
                },
                {
                    "name": "--output=\u001b[4mexpr",
                    "content": "Output  the  evaluation  of  expr for each line (turns off text highlighting). If PATTERN\nmatches more than once then a line is output for each non-overlapping match.\n\nexpr may contain the strings \"\\n\", \"\\r\"  and  \"\\t\",  which  will  be  expanded  to  their\ncorresponding characters line feed, carriage return and tab, respectively.\n\nexpr may also contain the following Perl special variables:\n\n$1 through $9\nThe  subpattern from the corresponding set of capturing parentheses.  If your pattern\nis \"(.+) and (.+)\", and the string is \"this and that', then $1 is \"this\"  and  $2  is\n\"that\".\n\n$  The contents of the line in the file.\n\n$.  The number of the line in the file.\n\n$&, \"$`\" and \"$'\"\n$&  is  the  the  string matched by the pattern, \"$`\" is what precedes the match, and\n\"$'\" is what  follows  it.   If  the  pattern  is  \"gra(ph|nd)\"  and  the  string  is\n\"lexicographic\", then $& is \"graph\", \"$`\" is \"lexico\" and \"$'\" is \"ic\".\n\nUse of these variables in your output will slow down the pattern matching.\n\n$+  The  match made by the last parentheses that matched in the pattern.  For example, if\nyour pattern is \"Version: (.+)|Revision: (.+)\", then $+ will contain whichever set of\nparentheses matched.\n\n$f  $f is available, in \"--output\" only, to insert the filename.  This is a stand-in  for\nthe  discovered  $filename  usage  in  old  \"ack2 --output\", which is disallowed with\n\"ack3\" improved security.\n\nThe intended usage is  to  provide  the  grep  or  compile-error  syntax  needed  for\neditor/IDE go-to-line integration, e.g. \"--output=$f:$.:$\" or \"--output=$f\\t$.\\t$&\"\n\n--pager=program, --nopager\n--pager  directs  ack's  output  through  program.   This  can  also be specified via the\n\"ACKPAGER\" and \"ACKPAGERCOLOR\" environment variables.\n\nUsing --pager does not suppress grouping and coloring like piping output on the  command-\nline does.\n\n--nopager  cancels  any setting in ~/.ackrc, \"ACKPAGER\" or \"ACKPAGERCOLOR\".  No output\nwill be sent through a pager.\n",
                    "long": "--output",
                    "arg": "\u001b[4mexpr"
                },
                {
                    "name": "--passthru",
                    "content": "Prints all lines, whether or not they match  the  expression.   Highlighting  will  still\nwork,  though, so it can be used to highlight matches while still seeing the entire file,\nas in:\n\n# Watch a log file, and highlight a certain IP address.\n$ tail -f ~/access.log | ack --passthru 123.45.67.89\n",
                    "long": "--passthru"
                },
                {
                    "name": "--print0",
                    "content": "Only works in conjunction with -f, -g, -l or -c, options that only list  filenames.   The\nfilenames  are  output  separated  with a null byte instead of the usual newline. This is\nhelpful when dealing with filenames that contain whitespace, e.g.\n\n# Remove all files of type HTML.\nack -f --html --print0 | xargs -0 rm -f\n",
                    "long": "--print0"
                },
                {
                    "name": "-p[N] --proximate[=N]",
                    "content": "Groups together match lines that are within N lines of each other.  This  is  useful  for\nvisually picking out matches that appear close to other matches.\n\nFor example, if you got these results without the \"--proximate\" option,\n\n15: First match\n18: Second match\n19: Third match\n37: Fourth match\n\nthey would look like this with \"--proximate=1\"\n\n15: First match\n\n18: Second match\n19: Third match\n\n37: Fourth match\n\nand this with \"--proximate=3\".\n\n15: First match\n18: Second match\n19: Third match\n\n37: Fourth match\n\nIf N is omitted, N is set to 1.\n"
                },
                {
                    "name": "-P   --proximate  --proximate=0",
                    "content": "",
                    "flag": "-P",
                    "long": "--proximate",
                    "arg": "0"
                },
                {
                    "name": "-Q --literal",
                    "content": "Quote all metacharacters in PATTERN, it is treated as a literal.\n",
                    "flag": "-Q",
                    "long": "--literal"
                },
                {
                    "name": "-r -R --recurse",
                    "content": "Recurse  into  sub-directories.  This is the default and just here for compatibility with\ngrep. You can also use it for turning --no-recurse off.\n\n--range-start=PATTERN, --range-end=PATTERN\nSpecifies patterns that mark the start and end of a range.  See \"MATCHING IN A  RANGE  OF\nLINES\" for details.\n",
                    "flag": "-R",
                    "long": "--recurse"
                },
                {
                    "name": "-s",
                    "content": "",
                    "flag": "-s"
                },
                {
                    "name": "-S --[no]smart-case --no-smart-case",
                    "content": "Ignore  case  in  the search strings if PATTERN contains no uppercase characters. This is\nsimilar to \"smartcase\" in the vim text editor.  The options overrides -i and -I.\n\n-S is a synonym for --smart-case.\n\n-i always overrides this option.\n",
                    "flag": "-S",
                    "long": "--no-smart-case"
                },
                {
                    "name": "--sort-files",
                    "content": "Sorts the found files lexicographically.  Use this if you want your file listings  to  be\ndeterministic between runs of ack.\n",
                    "long": "--sort-files"
                },
                {
                    "name": "--show-types",
                    "content": "Outputs the filetypes that ack associates with each file.\n\nWorks with -f and -g options.\n",
                    "long": "--show-types"
                },
                {
                    "name": "-t TYPE --type=TYPE --TYPE",
                    "content": "Specify  the  types  of files to include in the search.  TYPE is a filetype, like perl or\nxml.  --type=perl can also be specified as --perl, although this is deprecated.\n\nType inclusions can be repeated and are ORed together.\n\nSee ack --help-types for a list of valid types.\n",
                    "flag": "-t",
                    "long": "--TYPE",
                    "arg": "TYPE"
                },
                {
                    "name": "-T TYPE --type=noTYPE --noTYPE",
                    "content": "Specifies the type of files to exclude from the search.  --type=noperl  can  be  done  as\n--noperl, although this is deprecated.\n\nIf  a  file  is of both type \"foo\" and \"bar\", specifying both --type=foo and --type=nobar\nwill exclude the file, because an exclusion takes precedence over an inclusion.\n",
                    "flag": "-T",
                    "long": "--noTYPE",
                    "arg": "noTYPE"
                },
                {
                    "name": "--type-add _TYPE_:_FILTER_:\u001b[4mARGS",
                    "content": "Files with the given ARGS applied to the given FILTER are recognized  as  being  of  (the\nexisting) type TYPE.  See also \"Defining your own types\".\n",
                    "long": "--type-add"
                },
                {
                    "name": "--type-set _TYPE_:_FILTER_:\u001b[4mARGS",
                    "content": "Files  with  the  given  ARGS applied to the given FILTER are recognized as being of type\nTYPE. This replaces an existing definition for type TYPE.  See also  \"Defining  your  own\ntypes\".\n",
                    "long": "--type-set"
                },
                {
                    "name": "--type-del \u001b[4mTYPE",
                    "content": "The  filters  associated with TYPE are removed from Ack, and are no longer considered for\nsearches.\n",
                    "long": "--type-del"
                },
                {
                    "name": "--[no]underline",
                    "content": "Turns on underlining of matches, where \"underlining\" is printing a line of  carets  under\nthe match.\n\n$ ack -u foo\npeanuts.txt\n17: Come kick the football you fool\n^^^          ^^^\n623: Price per square foot\n^^^\n\nThis  is  useful  if you're dumping the results of an ack run into a text file or printer\nthat doesn't support ANSI color codes.\n\nThe setting of underline does not affect highlighting of matches.\n"
                },
                {
                    "name": "-v --invert-match",
                    "content": "Invert match: select non-matching lines.\n",
                    "flag": "-v",
                    "long": "--invert-match"
                },
                {
                    "name": "--version",
                    "content": "Display version and copyright information.\n",
                    "long": "--version"
                },
                {
                    "name": "-w --word-regexp",
                    "content": "Force PATTERN to match only whole words.\n",
                    "flag": "-w",
                    "long": "--word-regexp"
                },
                {
                    "name": "-x   --files-from=-",
                    "content": "input, with one line per file.\n\nNote  that  the  list  of  files is not filtered in any way.  If you add \"--type=html\" in\naddition to \"-x\", the \"--type\" will be ignored.\n",
                    "flag": "-x",
                    "long": "--files-from",
                    "arg": "-"
                },
                {
                    "name": "-1   --max-count=1",
                    "content": "-m1,  where  only  one  match per file is shown.  Also, -1 works with -f and -g, where -m\ndoes not.\n",
                    "flag": "-1",
                    "long": "--max-count",
                    "arg": "1"
                },
                {
                    "name": "--thpppt",
                    "content": "Display the all-important Bill The Cat logo.  Note that the exact spelling of  --thpppppt\nis not important.  It's checked against a regular expression.\n",
                    "long": "--thpppt"
                },
                {
                    "name": "--bar",
                    "content": "Check with the admiral for traps.\n",
                    "long": "--bar"
                },
                {
                    "name": "--cathy",
                    "content": "Chocolate, Chocolate, Chocolate!\n\nTHE .ackrc FILE\nThe  .ackrc  file contains command-line options that are prepended to the command line before\nprocessing.  Multiple options may live on multiple lines.   Lines  beginning  with  a  #  are\nignored.  A .ackrc might look like this:\n\n# Always sort the files\n--sort-files\n\n# Always color, even if piping to another program\n--color\n\n# Use \"less -r\" as my pager\n--pager=less -r\n\nNote that arguments with spaces in them do not need to be quoted, as they are not interpreted\nby the shell. Basically, each line in the .ackrc file is interpreted as one element of @ARGV.\n\nack  looks in several locations for .ackrc files; the searching process is detailed in \"ACKRC\nLOCATION SEMANTICS\".  These files are not considered if --noenv is specified on  the  command\nline.\n",
                    "long": "--cathy"
                }
            ]
        },
        "Defining your own types": {
            "content": "ack  allows  you  to  define your own types in addition to the predefined types. This is done\nwith command line options that are best put into an .ackrc file - then you  do  not  have  to\ndefine  your  types over and over again. In the following examples the options will always be\nshown on one command line so that they can be easily copy & pasted.\n\nFile types can be specified both with the the --type=xxx option,  or  the  file  type  as  an\noption  itself.   For  example,  if  you  create  a  filetype  of  \"cobol\",  you  can specify\n--type=cobol or simply --cobol.  File types must be at least two characters  long.   This  is\nwhy the C language is --cc and the R language is --rr.\n\nack  --perl  foo  searches  for  foo in all perl files. ack --help-types tells you, that perl\nfiles are files ending in .pl, .pm, .pod or .t. So what if you  would  like  to  include  .xs\nfiles  as  well  when  searching for --perl files? ack --type-add perl:ext:xs --perl foo does\nthis for you. --type-add appends additional extensions to an existing type.\n\nIf you want to define a  new  type,  or  completely  redefine  an  existing  type,  then  use\n--type-set.  ack --type-set eiffel:ext:e,eiffel defines the type eiffel to include files with\nthe extensions .e or .eiffel. So to search for all eiffel files containing the word  Bertrand\nuse  ack  --type-set  eiffel:ext:e,eiffel  --eiffel  Bertrand.   As usual, you can also write\n--type=eiffel instead of --eiffel. Negation also works, so  --noeiffel  excludes  all  eiffel\nfiles from a search. Redefining also works: ack --type-set cc:ext:c,h and .xs files no longer\nbelong to the type cc.\n\nWhen defining your own types in the .ackrc file you have to use the following:\n\n--type-set=eiffel:ext:e,eiffel\n\nor writing on separate lines\n\n--type-set\neiffel:ext:e,eiffel\n\nThe following does NOT work in the .ackrc file:\n\n--type-set eiffel:ext:e,eiffel\n\nIn  order  to  see  all  currently  defined  types,  use  --help-types,  e.g.  ack --type-set\nbackup:ext:bak --type-add perl:ext:perl --help-types\n\nIn addition to filtering based on extension, ack offers additional filter types.  The generic\nsyntax is --type-set TYPE:FILTER:ARGS; ARGS depends on the value of FILTER.\n\nis:FILENAME\nis filters match the target filename exactly.  It takes exactly one  argument,  which  is\nthe name of the file to match.\n\nExample:\n\n--type-set make:is:Makefile\n\next:EXTENSION[,EXTENSION2[,...]]\next  filters  match  the  extension  of the target file against a list of extensions.  No\nleading dot is needed for the extensions.\n\nExample:\n\n--type-set perl:ext:pl,pm,t\n\nmatch:PATTERN\nmatch filters match the target  filename  against  a  regular  expression.   The  regular\nexpression is made case-insensitive for the search.\n\nExample:\n\n--type-set make:match:/(gnu)?makefile/\n\nfirstlinematch:PATTERN\nfirstlinematch  matches  the  first line of the target file against a regular expression.\nLike match, the regular expression is made case insensitive.\n\nExample:\n\n--type-add perl:firstlinematch:/perl/\n",
            "subsections": []
        },
        "ACK COLORS": {
            "content": "ack allows customization of the colors it uses when presenting matches onscreen.  It uses the\ncolors available in Perl's  Term::ANSIColor  module,  which  provides  the  following  listed\nvalues. Note that case does not matter when using these values.\n\nThere are four different colors ack uses:\n\nAspect      Option              Env. variable       Default\n--------    -----------------   ------------------  ---------------\nfilename    --color-filename    ACKCOLORFILENAME  black onyellow\nmatch       --color-match       ACKCOLORMATCH     bold green\nline no.    --color-lineno      ACKCOLORLINENO    bold yellow\ncolumn no.  --color-colno       ACKCOLORCOLNO     bold yellow\n\nThe  column  number column is only used if the column number is shown because of the --column\noption.\n\nColors  may  be  specified  by  command-line  option,  such  as  \"ack   --color-filename='red\nonwhite'\",   or  by  setting  an  environment  variable,  such  as  \"ACKCOLORFILENAME='red\nonwhite'\".  Options for colors can be set in your ACKRC file (See \"THE .ackrc FILE\").\n\nack can understand the following colors for the foreground:\n\nblack red green yellow blue magenta cyan white\n\nThe optional background color is specified by prepending  \"on\"  to  one  of  the  foreground\ncolors:\n\nonblack onred ongreen onyellow onblue onmagenta oncyan onwhite\n\nEach of the foreground colors can be modified with the following attributes, which may or may\nnot be supported by your terminal:\n\nbold faint italic underline blink reverse concealed\n\nAny combinations of modifiers can be added to the foreground color. If your terminal supports\nit, and you enjoy visual punishment, you can specify:\n\nack --color-filename=\"blink italic underline bold red onyellow\"\n\nFor  charts  of  the  colors  and  what  they  look  like,  run  \"ack --help-colors\" and \"ack\n--help-rgb-colors\".\n\nIf the eight standard colors, in their bold, faint and unmodified states, aren't  enough  for\nyou  to  choose from, you can also specify colors by their RGB values.  They are specified as\n\"rgbXYZ\" where X, Y, and Z are values between 0 and 5 giving the intensity of red, green  and\nblue, respectively.  Therefore, \"rgb500\" is pure red, \"rgb505\" is purple, and so on.\n\nBackground  colors  can be specified with the \"on\" prefix prepended on an RGB color, so that\n\"onrgb505\" would be a purple background.\n\nThe modifier attributes of blink, italic, underscore and so on may or may not work on the RGB\ncolors.\n\nFor a chart of the 216 possible RGB colors, run \"ack --help-rgb-colors\".\n",
            "subsections": []
        },
        "ENVIRONMENT VARIABLES": {
            "content": "For commonly-used ack options, environment  variables  can  make  life  much  easier.   These\nvariables are ignored if --noenv is specified on the command line.\n\nACKRC\nSpecifies  the location of the user's .ackrc file.  If this file doesn't exist, ack looks\nin the default location.\n\nACKCOLORCOLNO\nColor specification for the column number in ack's output.  By default, the column number\nis not shown.  You have to enable it with the --column  option.   See  the  section  \"ack\nColors\" above.\n\nACKCOLORFILENAME\nColor  specification  for  the  filename  in  ack's output.  See the section \"ack Colors\"\nabove.\n\nACKCOLORLINENO\nColor specification for the line number in ack's output.  See the  section  \"ack  Colors\"\nabove.\n\nACKCOLORMATCH\nColor  specification  for the matched text in ack's output.  See the section \"ack Colors\"\nabove.\n\nACKPAGER\nSpecifies a pager program, such as \"more\", \"less\" or \"most\", to which ack will  send  its\noutput.\n\nUsing  \"ACKPAGER\"  does  not  suppress  grouping  and coloring like piping output on the\ncommand-line does, except that on Windows ack  will  assume  that  \"ACKPAGER\"  does  not\nsupport color.\n\n\"ACKPAGERCOLOR\" overrides \"ACKPAGER\" if both are specified.\n\nACKPAGERCOLOR\nSpecifies a pager program that understands ANSI color sequences.  Using \"ACKPAGERCOLOR\"\ndoes not suppress grouping and coloring like piping output on the command-line does.\n\nIf you are not on Windows, you never need to use \"ACKPAGERCOLOR\".\n\nACK & OTHER TOOLS",
            "subsections": [
                {
                    "name": "Simple vim integration",
                    "content": "ack integrates easily with the Vim text editor. Set this in your .vimrc to use ack instead of\ngrep:\n\nset grepprg=ack\\ -k\n\nThat example uses \"-k\" to search through only files of the types ack knows about, but you may\nuse  other  default flags. Now you can search with ack and easily step through the results in\nVim:\n\n:grep Dumper perllib\n"
                },
                {
                    "name": "Editor integration",
                    "content": "Many users have integrated ack into their preferred text editors.  For details and links, see\n<https://beyondgrep.com/more-tools/>.\n"
                },
                {
                    "name": "Shell and Return Code",
                    "content": "For greater compatibility with grep, ack in normal use returns shell return or exit code of 0\nonly if something is found and 1 if no match is found.\n\n(Shell exit code 1 is \"$?=256\" in perl with \"system\" or backticks.)\n\nThe grep code 2 for errors is not used.\n\nIf \"-f\" or \"-g\" are specified, then 0 is returned if at least one file is found.  If no files\nare found, then 1 is returned.\n"
                }
            ]
        },
        "DEBUGGING ACK PROBLEMS": {
            "content": "If ack gives you output you're not expecting, start with a few simple steps.\n",
            "subsections": [
                {
                    "name": "Try it with --noenv",
                    "content": "Your environment variables and .ackrc may be doing things you're not expecting, or  forgotten\nyou specified.  Use --noenv to ignore your environment and .ackrc.\n"
                },
                {
                    "name": "Use -f to see what files have been selected for searching",
                    "content": "Ack's  -f  was originally added as a debugging tool.  If ack is not finding matches you think\nit should find, run ack -f to see what files have  been  selected.   You  can  also  add  the\n\"--show-types\" options to show the type of each file selected.\n"
                },
                {
                    "name": "Use --dump",
                    "content": "This  lists  the  ackrc  files  that are loaded and the options loaded from them.  You may be\nloading an .ackrc file that you didn't know you were loading.\n"
                }
            ]
        },
        "ACKRC LOCATION SEMANTICS": {
            "content": "Ack can load its configuration from many sources.  The following list specifies  the  sources\nAck  looks  for  configuration files; each one that is found is loaded in the order specified\nhere, and each one overrides options set in any of the sources preceding it.   (For  example,\nif  I  set --sort-files in my user ackrc, and --nosort-files on the command line, the command\nline takes precedence)\n\n•   Defaults  are  loaded  from  App::Ack::ConfigDefaults.   This  can   be   omitted   using\n\"--ignore-ack-defaults\".\n\n•   Global ackrc\n\nOptions  are then loaded from the global ackrc.  This is located at \"/etc/ackrc\" on Unix-\nlike systems.\n\nUnder Windows XP and earlier, the global  ackrc  is  at  \"C:\\Documents  and  Settings\\All\nUsers\\Application Data\\ackrc\"\n\nUnder Windows Vista/7, the global ackrc is at \"C:\\ProgramData\\ackrc\"\n\nThe \"--noenv\" option prevents all ackrc files from being loaded.\n\n•   User ackrc\n\nOptions  are  then  loaded  from  the user's ackrc.  This is located at \"$HOME/.ackrc\" on\nUnix-like systems.\n\nUnder  Windows  XP  and   earlier,   the   user's   ackrc   is   at   \"C:\\Documents   and\nSettings\\$USER\\Application Data\\ackrc\".\n\nUnder Windows Vista/7, the user's ackrc is at \"C:\\Users\\$USER\\AppData\\Roaming\\ackrc\".\n\nIf  you  want  to  load a different user-level ackrc, it may be specified with the $ACKRC\nenvironment variable.\n\nThe \"--noenv\" option prevents all ackrc files from being loaded.\n\n•   Project ackrc\n\nOptions are then loaded from the project ackrc.  The project ackrc  is  the  first  ackrc\nfile  with  the name \".ackrc\" or \"ackrc\", first searching in the current directory, then\nthe parent directory, then the grandparent directory, etc.  This  can  be  omitted  using\n\"--noenv\".\n\n•   --ackrc\n\nThe  \"--ackrc\"  option  may be included on the command line to specify an ackrc file that\ncan override all others.  It is consulted even if \"--noenv\" is present.\n\n•   Command line\n\nOptions are then loaded from the command line.\n\nBUGS & ENHANCEMENTS\nack is based at GitHub at <https://github.com/beyondgrep/ack3>\n\nPlease  report  any  bugs   or   feature   requests   to   the   issues   list   at   GitHub:\n<https://github.com/beyondgrep/ack3/issues>.\n\nPlease  include  the  operating  system  that  you're  using;  the output of the command \"ack\n--version\"; and any customizations in your .ackrc you may have.\n\nTo       suggest       enhancements,       please       submit       an       issue        at\n<https://github.com/beyondgrep/ack3/issues>.   Also  read  the  DEVELOPERS.md file in the ack\ncode repository.\n\nAlso,   feel   free   to   discuss   your   issues   on   the    ack    mailing    list    at\n<https://groups.google.com/group/ack-users>.\n",
            "subsections": []
        },
        "SUPPORT": {
            "content": "Support for and information about ack can be found at:\n\n•   The ack homepage\n\n<https://beyondgrep.com/>\n\n•   Source repository\n\n<https://github.com/beyondgrep/ack3>\n\n•   The ack issues list at GitHub\n\n<https://github.com/beyondgrep/ack3/issues>\n\n•   The ack announcements mailing list\n\n<https://groups.google.com/group/ack-announcement>\n\n•   The ack users' mailing list\n\n<https://groups.google.com/group/ack-users>\n\n•   The ack development mailing list\n\n<https://groups.google.com/group/ack-users>\n",
            "subsections": []
        },
        "COMMUNITY": {
            "content": "There    are    ack    mailing    lists    and    a    Slack    channel    for    ack.    See\n<https://beyondgrep.com/community/> for details.\n",
            "subsections": []
        },
        "FAQ": {
            "content": "This is the Frequently Asked Questions list for ack.\n",
            "subsections": [
                {
                    "name": "Can I stop using grep now?",
                    "content": "Many people find ack to be better than grep as an everyday tool 99% of the  time,  but  don't\nthrow  grep  away,  because  there are times you'll still need it.  For example, you might be\nlooking through huge log files and not using regular expressions.  In that  case,  grep  will\nprobably perform better.\n"
                },
                {
                    "name": "Why isn't ack finding a match in (some file)?",
                    "content": "First,  take  a  look and see if ack is even looking at the file.  ack is intelligent in what\nfiles it will search and which ones it won't, but sometimes that can be surprising.\n\nUse the \"-f\" switch, with no regex, to see a list of files that ack will search for you.   If\nyour  file  doesn't show up in the list of files that \"ack -f\" shows, then ack never looks in\nit.\n"
                },
                {
                    "name": "Wouldn't it be great if _ack_ did search & replace?",
                    "content": "No, ack will always be read-only.  Perl has a perfectly good way to do search  &  replace  in\nfiles, using the \"-i\", \"-p\" and \"-n\" switches.\n\nYou  can  certainly use ack to select your files to update.  For example, to change all \"foo\"\nto \"bar\" in all PHP files, you can do this from the Unix shell:\n\n$ perl -i -p -e's/foo/bar/g' $(ack -f --php)\n"
                },
                {
                    "name": "Can I make ack recognize _.xyz_ files?",
                    "content": "Yes!  Please see \"Defining your own types\" in the ack manual.\n"
                },
                {
                    "name": "Will you make ack recognize _.xyz_ files by default?",
                    "content": "We might, depending on how widely-used the file format is.\n\nSubmit an issue at in the GitHub issue queue at  <https://github.com/beyondgrep/ack3/issues>.\nExplain  what the file format is, where we can find out more about it, and what you have been\nusing in your .ackrc to support it.\n\nPlease do not bother creating a pull request.  The code for filetypes is trivial compared  to\nthe rest of the process we go through.\n"
                },
                {
                    "name": "Why is it called ack if it's called ack-grep?",
                    "content": "The  name  of  the  program is \"ack\".  Some packagers have called it \"ack-grep\" when creating\npackages because there's already a package out there called \"ack\" that has nothing to do with\nthis ack.\n\nI suggest you make a symlink named ack that points to ack-grep because  one  of  the  crucial\nbenefits of ack is having a name that's so short and simple to type.\n\nTo do that, run this with sudo or as root:\n\nln -s /usr/bin/ack-grep /usr/bin/ack\n\nAlternatively, you could use a shell alias:\n\n# bash/zsh\nalias ack=ack-grep\n\n# csh\nalias ack ack-grep\n"
                },
                {
                    "name": "What does _ack_ mean?",
                    "content": "Nothing.   I  wanted  a  name  that was easy to type and that you could pronounce as a single\nsyllable.\n"
                },
                {
                    "name": "Can I do multi-line regexes?",
                    "content": "No, ack does not support regexes that match multiple lines.  Doing so would  require  reading\nin the entire file at a time.\n\nIf  you  want  to  see  lines  near  your  match, use the \"--A\", \"--B\" and \"--C\" switches for\ndisplaying context.\n"
                },
                {
                    "name": "Why is ack telling me I have an invalid option when searching for \"+foo\"?",
                    "content": "ack treats command line options beginning with \"+\" or \"-\" as options; if you  would  like  to\nsearch  for  these,  you  may  prefix your search term with \"--\" or use the \"--match\" option.\n(However, don't forget that \"+\" is a regular expression metacharacter!)\n"
                },
                {
                    "name": "Why does \"ack '.{40000,}'\" fail?  Isn't that a valid regex?",
                    "content": "The Perl language limits the repetition quantifier to 32K.  You can search for \".{32767}\" but\nnot \".{32768}\".\n"
                },
                {
                    "name": "Ack does \"X\" and shouldn't, should it?",
                    "content": "We try to remain as close to grep's behavior as possible, so when in  doubt,  see  what  grep\ndoes!  If there's a mismatch in functionality there, please submit an issue to GitHub, and/or\nbring it up on the ack-users mailing list.\n"
                }
            ]
        },
        "ACKNOWLEDGEMENTS": {
            "content": "How appropriate to have acknowledgements!\n\nThanks  to  everyone  who has contributed to ack in any way, including Thomas Gossler, Kieran\nMace, Volker Glave, Axel  Beckert,  Eric  Pement,  Gabor  Szabo,  Frieder  Bluemle,  Grzegorz\nKaczmarczyk,  Dan  Book,  Tomasz  Konojacki,  Salomon  Smeke, M. Scott Ford, Anders Eriksson,\nH.Merijn Brand, Duke Leto, Gerhard Poul, Ethan Mallove, Marek Kubica, Ray  Donnelly,  Nikolaj\nSchumacher,  Ed  Avis,  Nick Morrott, Austin Chamberlin, Varadinsky, Sébastien Feugère, Jakub\nWilk, Pete Houston, Stephen Thirlwall, Jonah Bishop, Chris Rebert, Denis Howe,  Raúl  Gundín,\nJames  McCoy,  Daniel  Perrett,  Steven  Lee,  Jonathan Perret, Fraser Tweedale, Raál Gundán,\nSteffen Jaeckel, Stephan Hohe, Michael Beijen, Alexandr  Ciornii,  Christian  Walde,  Charles\nLee,  Joe  McMahon,  John  Warwick,  David  Steinbrunner, Kara Martens, Volodymyr Medvid, Ron\nSavage, Konrad Borowski, Dale Sedivic, Michael McClimon, Andrew Black, Ralph Bodenner,  Shaun\nPatterson,  Ryan  Olson,  Shlomi  Fish,  Karen Etheridge, Olivier Mengue, Matthew Wild, Scott\nKyle, Nick Hooey, Bo Borgerson, Mark Szymanski, Marq Schneider, Packy  Anderson,  JR  Boyens,\nDan  Sully,  Ryan Niebur, Kent Fredric, Mike Morearty, Ingmar Vanhassel, Eric Van Dewoestine,\nSitaram Chamarty, Adam James, Richard  Carlsson,  Pedro  Melo,  AJ  Schuster,  Phil  Jackson,\nMichael  Schwern,  Jan  Dubois,  Christopher  J.  Madsen, Matthew Wickline, David Dyck, Jason\nPorritt, Jjgod Jiang, Thomas Klausner, Uri Guttman, Peter Lewis, Kevin Riggle, Ori  Avtalion,\nTorsten  Blix,  Nigel  Metheringham, Gábor Szabó, Tod Hagan, Michael Hendricks, Ævar Arnfjörð\nBjarmason, Piers Cawley, Stephen  Steneker,  Elias  Lutfallah,  Mark  Leighton  Fisher,  Matt\nDiephouse,  Christian  Jaeger,  Bill  Sully,  Bill Ricker, David Golden, Nilson Santos F. Jr,\nElliot Shank, Merijn Broeren, Uwe Voelker, Rick Scott, Ask  Bjørn  Hansen,  Jerry  Gay,  Will\nColeda, Mike O'Regan, Slaven Rezić, Mark Stosberg, David Alan Pisoni, Adriano Ferreira, James\nKeenan, Leland Johnson, Ricardo Signes, Pete Krawczyk and Rob Hoelz.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Andy Lester, \"<andy at petdance.com>\"\n\nCOPYRIGHT & LICENSE\nCopyright 2005-2023 Andy Lester.\n\nThis  program  is  free software; you can redistribute it and/or modify it under the terms of\nthe Artistic License v2.0.\n\nSee https://www.perlfoundation.org/artistic-license-20.html or the LICENSE.md file that comes\nwith the ack distribution.\n\nperl v5.36.0                                 2023-06-14                                      ACK(1p)",
            "subsections": []
        }
    },
    "summary": "ack - grep-like text finder",
    "flags": [
        {
            "flag": "",
            "long": "--ackrc",
            "arg": null,
            "description": "Specifies an ackrc file to load after all others; see \"ACKRC LOCATION SEMANTICS\"."
        },
        {
            "flag": "-A",
            "long": "--after-context",
            "arg": "\u001b[4mNUM",
            "description": "Print NUM lines of trailing context after matching lines."
        },
        {
            "flag": "-B",
            "long": "--before-context",
            "arg": "\u001b[4mNUM",
            "description": "Print NUM lines of leading context before matching lines."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Print a break between results from different files. On by default when used interactively."
        },
        {
            "flag": "-C",
            "long": null,
            "arg": "[_NUM_]",
            "description": "Print NUM lines (default 2) of context around matching lines. You can specify zero lines of context to override another context specified in an ackrc."
        },
        {
            "flag": "-c",
            "long": "--count",
            "arg": null,
            "description": "Suppress normal output; instead print a count of matching lines for each input file. If -l is in effect, it will only show the number of lines for each file that has lines matching. Without -l, some line counts may be zeroes. If combined with -h (--no-filename) ack outputs only one total count. --[no]color, --[no]colour --color highlights the matching text. --nocolor suppresses the color. This is on by default unless the output is redirected. On Windows, this option is off by default unless the Win32::Console::ANSI module is installed or the \"ACKPAGERCOLOR\" environment variable is used."
        },
        {
            "flag": "",
            "long": "--color-filename",
            "arg": "\u001b[4mcolor",
            "description": "Sets the color to be used for filenames."
        },
        {
            "flag": "",
            "long": "--color-match",
            "arg": "\u001b[4mcolor",
            "description": "Sets the color to be used for matches."
        },
        {
            "flag": "",
            "long": "--color-colno",
            "arg": "\u001b[4mcolor",
            "description": "Sets the color to be used for column numbers."
        },
        {
            "flag": "",
            "long": "--color-lineno",
            "arg": "\u001b[4mcolor",
            "description": "Sets the color to be used for line numbers."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Show the column number of the first match. This is helpful for editors that can place your cursor at a given position."
        },
        {
            "flag": "",
            "long": "--create-ackrc",
            "arg": null,
            "description": "Dumps the default ack options to standard output. This is useful for when you want to customize the defaults."
        },
        {
            "flag": "",
            "long": "--dump",
            "arg": null,
            "description": "Writes the list of options loaded and where they came from to standard output. Handy for debugging."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "--noenv disables all environment processing. No .ackrc is read and all environment variables are ignored. By default, ack considers .ackrc and settings in the environment."
        },
        {
            "flag": "",
            "long": "--flush",
            "arg": null,
            "description": "--flush flushes output immediately. This is off by default unless ack is running interactively (when output goes to a pipe or file)."
        },
        {
            "flag": "-f",
            "long": null,
            "arg": null,
            "description": "PATTERN must not be specified, or it will be taken as a path to search."
        },
        {
            "flag": "",
            "long": "--files-from",
            "arg": "\u001b[4mFILE",
            "description": "The list of files to be searched is specified in FILE. The list of files are separated by newlines. If FILE is \"-\", the list is loaded from standard input. Note that the list of files is not filtered in any way. If you add \"--type=html\" in addition to \"--files-from\", the \"--type\" will be ignored."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Forces ack to act as if it were receiving input via a pipe."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Follow or don't follow symlinks, other than whatever starting files or directories were specified on the command line. This is off by default."
        },
        {
            "flag": "-g",
            "long": null,
            "arg": null,
            "description": "Print searchable files where the relative path + filename matches PATTERN. Note that ack -g foo is exactly the same as ack -f | ack foo This means that just as ack will not search, for example, .jpg files, \"-g\" will not list .jpg files either. ack is not intended to be a general-purpose file finder. Note also that if you have \"-i\" in your .ackrc that the filenames to be matched will be case-insensitive as well. This option can be combined with --color to make it easier to spot the match."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "--group groups matches by file name. This is the default when used interactively. --nogroup prints one result per line, like grep. This is the default when output is redirected."
        },
        {
            "flag": "-H",
            "long": "--with-filename",
            "arg": null,
            "description": "Print the filename for each match. This is the default unless searching a single explicitly specified file."
        },
        {
            "flag": "-h",
            "long": "--no-filename",
            "arg": null,
            "description": "Suppress the prefixing of filenames on output when multiple files are searched."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Print a filename heading above each file's results. This is the default when used interactively."
        },
        {
            "flag": "",
            "long": "--help",
            "arg": null,
            "description": "Print a short help statement."
        },
        {
            "flag": "",
            "long": "--help-types",
            "arg": null,
            "description": "Print all known types."
        },
        {
            "flag": "",
            "long": "--help-colors",
            "arg": null,
            "description": "Print a chart of various color combinations."
        },
        {
            "flag": "",
            "long": "--help-rgb-colors",
            "arg": null,
            "description": "Like --help-colors but with more precise RGB colors."
        },
        {
            "flag": "-i",
            "long": "--ignore-case",
            "arg": null,
            "description": "Ignore case distinctions in PATTERN. Overrides --smart-case and -I."
        },
        {
            "flag": "-I",
            "long": "--no-ignore-case",
            "arg": null,
            "description": "Turns on case distinctions in PATTERN. Overrides --smart-case and -i."
        },
        {
            "flag": "",
            "long": "--ignore-ack-defaults",
            "arg": null,
            "description": "Tells ack to completely ignore the default definitions provided with ack. This is useful in combination with --create-ackrc if you really want to customize ack. --[no]ignore-dir=DIRNAME, --[no]ignore-directory=\u001b[4mDIRNAME Ignore directory (as CVS, .svn, etc are ignored). May be used multiple times to ignore multiple directories. For example, mason users may wish to include --ignore-dir=data. The --noignore-dir option allows users to search directories which would normally be ignored (perhaps to research the contents of .svn/props directories). The DIRNAME must always be a simple directory name. Nested directories like foo/bar are NOT supported. You would need to specify --ignore-dir=foo and then no files from any foo directory are taken into account by ack unless given explicitly on the command line."
        },
        {
            "flag": "",
            "long": "--ignore-file",
            "arg": "\u001b[4mFILTER:ARGS",
            "description": "Ignore files matching FILTER:ARGS. The filters are specified identically to file type filters as seen in \"Defining your own types\"."
        },
        {
            "flag": "-k",
            "long": "--known-types",
            "arg": null,
            "description": "Limit selected files to those with types that ack knows about."
        },
        {
            "flag": "-l",
            "long": "--files-with-matches",
            "arg": null,
            "description": "Only print the filenames of matching files, instead of the matching text."
        },
        {
            "flag": "-L",
            "long": "--files-without-matches",
            "arg": null,
            "description": "Only print the filenames of files that do NOT match."
        },
        {
            "flag": "",
            "long": "--match",
            "arg": null,
            "description": "Specify the PATTERN explicitly. This is helpful if you don't want to put the regex as your first argument, e.g. when executing multiple searches over the same set of files. # search for foo and bar in given files ack file1 t/file* --match foo ack file1 t/file* --match bar"
        },
        {
            "flag": "",
            "long": "--max-count",
            "arg": "\u001b[4mNUM",
            "description": "Print only NUM matches out of each file. If you want to stop ack after printing the first match of any kind, use the -1 options."
        },
        {
            "flag": "",
            "long": "--man",
            "arg": null,
            "description": "Print this manual page."
        },
        {
            "flag": "-n",
            "long": "--no-recurse",
            "arg": null,
            "description": "No descending into subdirectories."
        },
        {
            "flag": "",
            "long": "--not",
            "arg": "PATTERN",
            "description": "Specifies a PATTERN that must NOT me true on a given line for a match to occur. This option can be repeated. If you want to find all the lines with \"dogs\" but not if \"cats\" or \"fish\" appear on the line, use: ack dogs --not cats --not fish Note that the options that affect \"dogs\" also affect \"cats\" and \"fish\", so if you have ack -i -w dogs --not cats the the search for both \"dogs\" and \"cats\" will be case-insensitive and be word-limited."
        },
        {
            "flag": "-o",
            "long": null,
            "arg": null,
            "description": "exactly the same as \"--output=$&\"."
        },
        {
            "flag": "",
            "long": "--output",
            "arg": "\u001b[4mexpr",
            "description": "Output the evaluation of expr for each line (turns off text highlighting). If PATTERN matches more than once then a line is output for each non-overlapping match. expr may contain the strings \"\\n\", \"\\r\" and \"\\t\", which will be expanded to their corresponding characters line feed, carriage return and tab, respectively. expr may also contain the following Perl special variables: $1 through $9 The subpattern from the corresponding set of capturing parentheses. If your pattern is \"(.+) and (.+)\", and the string is \"this and that', then $1 is \"this\" and $2 is \"that\". $ The contents of the line in the file. $. The number of the line in the file. $&, \"$`\" and \"$'\" $& is the the string matched by the pattern, \"$`\" is what precedes the match, and \"$'\" is what follows it. If the pattern is \"gra(ph|nd)\" and the string is \"lexicographic\", then $& is \"graph\", \"$`\" is \"lexico\" and \"$'\" is \"ic\". Use of these variables in your output will slow down the pattern matching. $+ The match made by the last parentheses that matched in the pattern. For example, if your pattern is \"Version: (.+)|Revision: (.+)\", then $+ will contain whichever set of parentheses matched. $f $f is available, in \"--output\" only, to insert the filename. This is a stand-in for the discovered $filename usage in old \"ack2 --output\", which is disallowed with \"ack3\" improved security. The intended usage is to provide the grep or compile-error syntax needed for editor/IDE go-to-line integration, e.g. \"--output=$f:$.:$\" or \"--output=$f\\t$.\\t$&\" --pager=program, --nopager --pager directs ack's output through program. This can also be specified via the \"ACKPAGER\" and \"ACKPAGERCOLOR\" environment variables. Using --pager does not suppress grouping and coloring like piping output on the command- line does. --nopager cancels any setting in ~/.ackrc, \"ACKPAGER\" or \"ACKPAGERCOLOR\". No output will be sent through a pager."
        },
        {
            "flag": "",
            "long": "--passthru",
            "arg": null,
            "description": "Prints all lines, whether or not they match the expression. Highlighting will still work, though, so it can be used to highlight matches while still seeing the entire file, as in: # Watch a log file, and highlight a certain IP address. $ tail -f ~/access.log | ack --passthru 123.45.67.89"
        },
        {
            "flag": "",
            "long": "--print0",
            "arg": null,
            "description": "Only works in conjunction with -f, -g, -l or -c, options that only list filenames. The filenames are output separated with a null byte instead of the usual newline. This is helpful when dealing with filenames that contain whitespace, e.g. # Remove all files of type HTML. ack -f --html --print0 | xargs -0 rm -f"
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Groups together match lines that are within N lines of each other. This is useful for visually picking out matches that appear close to other matches. For example, if you got these results without the \"--proximate\" option, 15: First match 18: Second match 19: Third match 37: Fourth match they would look like this with \"--proximate=1\" 15: First match 18: Second match 19: Third match 37: Fourth match and this with \"--proximate=3\". 15: First match 18: Second match 19: Third match 37: Fourth match If N is omitted, N is set to 1."
        },
        {
            "flag": "-P",
            "long": "--proximate",
            "arg": "0",
            "description": ""
        },
        {
            "flag": "-Q",
            "long": "--literal",
            "arg": null,
            "description": "Quote all metacharacters in PATTERN, it is treated as a literal."
        },
        {
            "flag": "-R",
            "long": "--recurse",
            "arg": null,
            "description": "Recurse into sub-directories. This is the default and just here for compatibility with grep. You can also use it for turning --no-recurse off. --range-start=PATTERN, --range-end=PATTERN Specifies patterns that mark the start and end of a range. See \"MATCHING IN A RANGE OF LINES\" for details."
        },
        {
            "flag": "-s",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-S",
            "long": "--no-smart-case",
            "arg": null,
            "description": "Ignore case in the search strings if PATTERN contains no uppercase characters. This is similar to \"smartcase\" in the vim text editor. The options overrides -i and -I. -S is a synonym for --smart-case. -i always overrides this option."
        },
        {
            "flag": "",
            "long": "--sort-files",
            "arg": null,
            "description": "Sorts the found files lexicographically. Use this if you want your file listings to be deterministic between runs of ack."
        },
        {
            "flag": "",
            "long": "--show-types",
            "arg": null,
            "description": "Outputs the filetypes that ack associates with each file. Works with -f and -g options."
        },
        {
            "flag": "-t",
            "long": "--TYPE",
            "arg": "TYPE",
            "description": "Specify the types of files to include in the search. TYPE is a filetype, like perl or xml. --type=perl can also be specified as --perl, although this is deprecated. Type inclusions can be repeated and are ORed together. See ack --help-types for a list of valid types."
        },
        {
            "flag": "-T",
            "long": "--noTYPE",
            "arg": "noTYPE",
            "description": "Specifies the type of files to exclude from the search. --type=noperl can be done as --noperl, although this is deprecated. If a file is of both type \"foo\" and \"bar\", specifying both --type=foo and --type=nobar will exclude the file, because an exclusion takes precedence over an inclusion."
        },
        {
            "flag": "",
            "long": "--type-add",
            "arg": null,
            "description": "Files with the given ARGS applied to the given FILTER are recognized as being of (the existing) type TYPE. See also \"Defining your own types\"."
        },
        {
            "flag": "",
            "long": "--type-set",
            "arg": null,
            "description": "Files with the given ARGS applied to the given FILTER are recognized as being of type TYPE. This replaces an existing definition for type TYPE. See also \"Defining your own types\"."
        },
        {
            "flag": "",
            "long": "--type-del",
            "arg": null,
            "description": "The filters associated with TYPE are removed from Ack, and are no longer considered for searches."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Turns on underlining of matches, where \"underlining\" is printing a line of carets under the match. $ ack -u foo peanuts.txt 17: Come kick the football you fool ^^^ ^^^ 623: Price per square foot ^^^ This is useful if you're dumping the results of an ack run into a text file or printer that doesn't support ANSI color codes. The setting of underline does not affect highlighting of matches."
        },
        {
            "flag": "-v",
            "long": "--invert-match",
            "arg": null,
            "description": "Invert match: select non-matching lines."
        },
        {
            "flag": "",
            "long": "--version",
            "arg": null,
            "description": "Display version and copyright information."
        },
        {
            "flag": "-w",
            "long": "--word-regexp",
            "arg": null,
            "description": "Force PATTERN to match only whole words."
        },
        {
            "flag": "-x",
            "long": "--files-from",
            "arg": "-",
            "description": "input, with one line per file. Note that the list of files is not filtered in any way. If you add \"--type=html\" in addition to \"-x\", the \"--type\" will be ignored."
        },
        {
            "flag": "-1",
            "long": "--max-count",
            "arg": "1",
            "description": "-m1, where only one match per file is shown. Also, -1 works with -f and -g, where -m does not."
        },
        {
            "flag": "",
            "long": "--thpppt",
            "arg": null,
            "description": "Display the all-important Bill The Cat logo. Note that the exact spelling of --thpppppt is not important. It's checked against a regular expression."
        },
        {
            "flag": "",
            "long": "--bar",
            "arg": null,
            "description": "Check with the admiral for traps."
        },
        {
            "flag": "",
            "long": "--cathy",
            "arg": null,
            "description": "Chocolate, Chocolate, Chocolate! THE .ackrc FILE The .ackrc file contains command-line options that are prepended to the command line before processing. Multiple options may live on multiple lines. Lines beginning with a # are ignored. A .ackrc might look like this: # Always sort the files --sort-files # Always color, even if piping to another program --color # Use \"less -r\" as my pager --pager=less -r Note that arguments with spaces in them do not need to be quoted, as they are not interpreted by the shell. Basically, each line in the .ackrc file is interpreted as one element of @ARGV. ack looks in several locations for .ackrc files; the searching process is detailed in \"ACKRC LOCATION SEMANTICS\". These files are not considered if --noenv is specified on the command line."
        }
    ],
    "examples": [],
    "see_also": [],
    "tldr": {
        "source": "official",
        "description": "A search tool like `grep`, optimized for developers.",
        "examples": [
            {
                "description": "Search for files containing a string or `regex` in the current directory recursively",
                "command": "ack \"{{search_pattern}}\""
            },
            {
                "description": "Search for a case-insensitive pattern",
                "command": "ack {{-i|--ignore-case}} \"{{search_pattern}}\""
            },
            {
                "description": "Search for lines matching a pattern, printing only the matched text and not the rest of the line",
                "command": "ack {{-o|--output '$&'}} \"{{search_pattern}}\""
            },
            {
                "description": "Limit search to files of a specific type",
                "command": "ack {{-t|--type}} {{ruby}} \"{{search_pattern}}\""
            },
            {
                "description": "Do not search in files of a specific type",
                "command": "ack {{-t|--type}} no{{ruby}} \"{{search_pattern}}\""
            },
            {
                "description": "Count the total number of matches found",
                "command": "ack {{-c|--count}} {{-h|--no-filename}} \"{{search_pattern}}\""
            },
            {
                "description": "Print the file names and the number of matches for each file only",
                "command": "ack {{-c|--count}} {{-l|--files-with-matches}} \"{{search_pattern}}\""
            },
            {
                "description": "List all the values that can be used with `--type`",
                "command": "ack --help-types"
            }
        ]
    }
}