.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "ACK 1p" .TH ACK 1p "2019-04-08" "perl v5.28.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" ack \- grep\-like text finder .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& ack [options] PATTERN [FILE...] \& ack \-f [options] [DIRECTORY...] .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" ack is designed as an alternative to \fIgrep\fR for programmers. .PP ack searches the named input files or directories for lines containing a match to the given \s-1PATTERN.\s0 By default, ack prints the matching lines. If no \s-1FILE\s0 or \s-1DIRECTORY\s0 is given, the current directory will be searched. .PP \&\s-1PATTERN\s0 is a Perl regular expression. Perl regular expressions are commonly found in other programming languages, but for the particulars of their behavior, please consult . If you don't know how to use regular expression but are interested in learning, you may consult . If you do not need or want ack to use regular expressions, please see the \&\f(CW\*(C`\-Q\*(C'\fR/\f(CW\*(C`\-\-literal\*(C'\fR option. .PP Ack can also list files that would be searched, without actually searching them, to let you take advantage of ack's file-type filtering capabilities. .SH "FILE SELECTION" .IX Header "FILE SELECTION" If files are not specified for searching, either on the command line or piped in with the \f(CW\*(C`\-x\*(C'\fR option, \fIack\fR delves into subdirectories selecting files for searching. .PP \&\fIack\fR is intelligent about the files it searches. It knows about certain file types, based on both the extension on the file and, in some cases, the contents of the file. These selections can be made with the \fB\-\-type\fR option. .PP With no file selection, \fIack\fR searches through regular files that are not explicitly excluded by \fB\-\-ignore\-dir\fR and \fB\-\-ignore\-file\fR options, either present in \fIackrc\fR files or on the command line. .PP The default options for \fIack\fR ignore certain files and directories. These include: .IP "\(bu" 4 Backup files: Files matching \fI#*#\fR or ending with \fI~\fR. .IP "\(bu" 4 Coredumps: Files matching \fIcore.\ed+\fR .IP "\(bu" 4 Version control directories like \fI.svn\fR and \fI.git\fR. .PP Run \fIack\fR with the \f(CW\*(C`\-\-dump\*(C'\fR option to see what settings are set. .PP However, \fIack\fR always searches the files given on the command line, no matter what type. If you tell \fIack\fR to search in a coredump, it will search in a coredump. .SH "DIRECTORY SELECTION" .IX Header "DIRECTORY SELECTION" \&\fIack\fR descends through the directory tree of the starting directories specified. If no directories are specified, the current working directory is used. However, it will ignore the shadow directories used by many version control systems, and the build directories used by the Perl MakeMaker system. You may add or remove a directory from this list with the \fB\-\-[no]ignore\-dir\fR option. The option may be repeated to add/remove multiple directories from the ignore list. .PP For a complete list of directories that do not get searched, run \&\f(CW\*(C`ack \-\-dump\*(C'\fR. .SH "WHEN TO USE GREP" .IX Header "WHEN TO USE GREP" \&\fIack\fR trumps \fIgrep\fR as an everyday tool 99% of the time, but don't throw \fIgrep\fR away, because there are times you'll still need it. .PP E.g., searching through huge files looking for regexes that can be expressed with \fIgrep\fR syntax should be quicker with \fIgrep\fR. .PP If your script or parent program uses \fIgrep\fR \f(CW\*(C`\-\-quiet\*(C'\fR or \f(CW\*(C`\-\-silent\*(C'\fR or needs exit 2 on \s-1IO\s0 error, use \fIgrep\fR. .SH "OPTIONS" .IX Header "OPTIONS" .IP "\fB\-\-ackrc\fR" 4 .IX Item "--ackrc" Specifies an ackrc file to load after all others; see \*(L"\s-1ACKRC LOCATION SEMANTICS\*(R"\s0. .IP "\fB\-A \f(BI\s-1NUM\s0\fB\fR, \fB\-\-after\-context=\f(BI\s-1NUM\s0\fB\fR" 4 .IX Item "-A NUM, --after-context=NUM" Print \fI\s-1NUM\s0\fR lines of trailing context after matching lines. .IP "\fB\-B \f(BI\s-1NUM\s0\fB\fR, \fB\-\-before\-context=\f(BI\s-1NUM\s0\fB\fR" 4 .IX Item "-B NUM, --before-context=NUM" Print \fI\s-1NUM\s0\fR lines of leading context before matching lines. .IP "\fB\-\-[no]break\fR" 4 .IX Item "--[no]break" Print a break between results from different files. On by default when used interactively. .IP "\fB\-C [\f(BI\s-1NUM\s0\fB]\fR, \fB\-\-context[=\f(BI\s-1NUM\s0\fB]\fR" 4 .IX Item "-C [NUM], --context[=NUM]" Print \fI\s-1NUM\s0\fR lines (default 2) of context around matching lines. You can specify zero lines of context to override another context specified in an ackrc. .IP "\fB\-c\fR, \fB\-\-count\fR" 4 .IX Item "-c, --count" Suppress normal output; instead print a count of matching lines for each input file. If \fB\-l\fR is in effect, it will only show the number of lines for each file that has lines matching. Without \&\fB\-l\fR, some line counts may be zeroes. .Sp If combined with \fB\-h\fR (\fB\-\-no\-filename\fR) ack outputs only one total count. .IP "\fB\-\-[no]color\fR, \fB\-\-[no]colour\fR" 4 .IX Item "--[no]color, --[no]colour" \&\fB\-\-color\fR highlights the matching text. \fB\-\-nocolor\fR suppresses the color. This is on by default unless the output is redirected. .Sp On Windows, this option is off by default unless the Win32::Console::ANSI module is installed or the \f(CW\*(C`ACK_PAGER_COLOR\*(C'\fR environment variable is used. .IP "\fB\-\-color\-filename=\f(BIcolor\fB\fR" 4 .IX Item "--color-filename=color" Sets the color to be used for filenames. .IP "\fB\-\-color\-match=\f(BIcolor\fB\fR" 4 .IX Item "--color-match=color" Sets the color to be used for matches. .IP "\fB\-\-color\-lineno=\f(BIcolor\fB\fR" 4 .IX Item "--color-lineno=color" Sets the color to be used for line numbers. .IP "\fB\-\-[no]column\fR" 4 .IX Item "--[no]column" Show the column number of the first match. This is helpful for editors that can place your cursor at a given position. .IP "\fB\-\-create\-ackrc\fR" 4 .IX Item "--create-ackrc" Dumps the default ack options to standard output. This is useful for when you want to customize the defaults. .IP "\fB\-\-dump\fR" 4 .IX Item "--dump" Writes the list of options loaded and where they came from to standard output. Handy for debugging. .IP "\fB\-\-[no]env\fR" 4 .IX Item "--[no]env" \&\fB\-\-noenv\fR disables all environment processing. No \fI.ackrc\fR is read and all environment variables are ignored. By default, \fIack\fR considers \fI.ackrc\fR and settings in the environment. .IP "\fB\-\-flush\fR" 4 .IX Item "--flush" \&\fB\-\-flush\fR flushes output immediately. This is off by default unless ack is running interactively (when output goes to a pipe or file). .IP "\fB\-f\fR" 4 .IX Item "-f" Only print the files that would be searched, without actually doing any searching. \s-1PATTERN\s0 must not be specified, or it will be taken as a path to search. .IP "\fB\-\-files\-from=\f(BI\s-1FILE\s0\fB\fR" 4 .IX Item "--files-from=FILE" The list of files to be searched is specified in \fI\s-1FILE\s0\fR. The list of files are separated by newlines. If \fI\s-1FILE\s0\fR is \f(CW\*(C`\-\*(C'\fR, the list is loaded from standard input. .IP "\fB\-\-[no]filter\fR" 4 .IX Item "--[no]filter" Forces ack to act as if it were receiving input via a pipe. .IP "\fB\-\-[no]follow\fR" 4 .IX Item "--[no]follow" Follow or don't follow symlinks, other than whatever starting files or directories were specified on the command line. .Sp This is off by default. .IP "\fB\-g \f(BI\s-1PATTERN\s0\fB\fR" 4 .IX Item "-g PATTERN" Print searchable files where the relative path + filename matches \&\fI\s-1PATTERN\s0\fR. .Sp Note that .Sp .Vb 1 \& ack \-g foo .Ve .Sp is exactly the same as .Sp .Vb 1 \& ack \-f | ack foo .Ve .Sp This means that just as ack will not search, for example, \fI.jpg\fR files, \f(CW\*(C`\-g\*(C'\fR will not list \fI.jpg\fR files either. ack is not intended to be a general-purpose file finder. .Sp Note also that if you have \f(CW\*(C`\-i\*(C'\fR in your .ackrc that the filenames to be matched will be case-insensitive as well. .Sp This option can be combined with \fB\-\-color\fR to make it easier to spot the match. .IP "\fB\-\-[no]group\fR" 4 .IX Item "--[no]group" \&\fB\-\-group\fR groups matches by file name. This is the default when used interactively. .Sp \&\fB\-\-nogroup\fR prints one result per line, like grep. This is the default when output is redirected. .IP "\fB\-H\fR, \fB\-\-with\-filename\fR" 4 .IX Item "-H, --with-filename" Print the filename for each match. This is the default unless searching a single explicitly specified file. .IP "\fB\-h\fR, \fB\-\-no\-filename\fR" 4 .IX Item "-h, --no-filename" Suppress the prefixing of filenames on output when multiple files are searched. .IP "\fB\-\-[no]heading\fR" 4 .IX Item "--[no]heading" Print a filename heading above each file's results. This is the default when used interactively. .IP "\fB\-\-help\fR, \fB\-?\fR" 4 .IX Item "--help, -?" Print a short help statement. .IP "\fB\-\-help\-types\fR, \fB\-\-help=types\fR" 4 .IX Item "--help-types, --help=types" Print all known types. .IP "\fB\-i\fR, \fB\-\-ignore\-case\fR" 4 .IX Item "-i, --ignore-case" Ignore case distinctions in \s-1PATTERN\s0 .IP "\fB\-\-ignore\-ack\-defaults\fR" 4 .IX Item "--ignore-ack-defaults" Tells ack to completely ignore the default definitions provided with ack. This is useful in combination with \fB\-\-create\-ackrc\fR if you \fIreally\fR want to customize ack. .IP "\fB\-\-[no]ignore\-dir=\f(BI\s-1DIRNAME\s0\fB\fR, \fB\-\-[no]ignore\-directory=\f(BI\s-1DIRNAME\s0\fB\fR" 4 .IX Item "--[no]ignore-dir=DIRNAME, --[no]ignore-directory=DIRNAME" Ignore directory (as \s-1CVS,\s0 .svn, etc are ignored). May be used multiple times to ignore multiple directories. For example, mason users may wish to include \fB\-\-ignore\-dir=data\fR. The \fB\-\-noignore\-dir\fR option allows users to search directories which would normally be ignored (perhaps to research the contents of \fI.svn/props\fR directories). .Sp The \fI\s-1DIRNAME\s0\fR must always be a simple directory name. Nested directories like \fIfoo/bar\fR are \s-1NOT\s0 supported. You would need to specify \fB\-\-ignore\-dir=foo\fR and then no files from any foo directory are taken into account by ack unless given explicitly on the command line. .IP "\fB\-\-ignore\-file=\f(BI\s-1FILTERTYPE:FILTERARGS\s0\fB\fR" 4 .IX Item "--ignore-file=FILTERTYPE:FILTERARGS" Ignore files matching \fI\s-1FILTERTYPE:FILTERARGS\s0\fR. The filters are specified identically to file type filters as seen in \*(L"Defining your own types\*(R". .IP "\fB\-k\fR, \fB\-\-known\-types\fR" 4 .IX Item "-k, --known-types" Limit selected files to those with types that ack knows about. This is equivalent to the default behavior found in ack 1. .IP "\fB\-\-lines=\f(BI\s-1NUM\s0\fB\fR" 4 .IX Item "--lines=NUM" Only print line \fI\s-1NUM\s0\fR of each file. Multiple lines can be given with multiple \fB\-\-lines\fR options or as a comma separated list (\fB\-\-lines=3,5,7\fR). \&\fB\-\-lines=4\-7\fR also works, as well as any combination (\fB\-\-lines=3,15\-20,43\fR) The lines are always output in ascending order, no matter the order given on the command line. No pattern is matched. .IP "\fB\-l\fR, \fB\-\-files\-with\-matches\fR" 4 .IX Item "-l, --files-with-matches" Only print the filenames of matching files, instead of the matching text. .IP "\fB\-L\fR, \fB\-\-files\-without\-matches\fR" 4 .IX Item "-L, --files-without-matches" Only print the filenames of files that do \fI\s-1NOT\s0\fR match. .IP "\fB\-\-match \f(BI\s-1PATTERN\s0\fB\fR" 4 .IX Item "--match PATTERN" Specify the \fI\s-1PATTERN\s0\fR 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. .Sp .Vb 3 \& # search for foo and bar in given files \& ack file1 t/file* \-\-match foo \& ack file1 t/file* \-\-match bar .Ve .IP "\fB\-m=\f(BI\s-1NUM\s0\fB\fR, \fB\-\-max\-count=\f(BI\s-1NUM\s0\fB\fR" 4 .IX Item "-m=NUM, --max-count=NUM" Stop reading a file after \fI\s-1NUM\s0\fR matches. .IP "\fB\-\-man\fR" 4 .IX Item "--man" Print this manual page. .IP "\fB\-n\fR, \fB\-\-no\-recurse\fR" 4 .IX Item "-n, --no-recurse" No descending into subdirectories. .IP "\fB\-o\fR" 4 .IX Item "-o" Show only the part of each line matching \s-1PATTERN\s0 (turns off text highlighting) .IP "\fB\-\-output=\f(BIexpr\fB\fR" 4 .IX Item "--output=expr" Output the evaluation of \fIexpr\fR for each line (turns off text highlighting) If \s-1PATTERN\s0 matches more than once then a line is output for each non-overlapping match. For more information please see the section "Examples of \fI\-\-output\fR". .IP "\fB\-\-pager=\f(BIprogram\fB\fR, \fB\-\-nopager\fR" 4 .IX Item "--pager=program, --nopager" \&\fB\-\-pager\fR directs ack's output through \fIprogram\fR. This can also be specified via the \f(CW\*(C`ACK_PAGER\*(C'\fR and \f(CW\*(C`ACK_PAGER_COLOR\*(C'\fR environment variables. .Sp Using \-\-pager does not suppress grouping and coloring like piping output on the command-line does. .Sp \&\fB\-\-nopager\fR cancels any setting in ~/.ackrc, \f(CW\*(C`ACK_PAGER\*(C'\fR or \f(CW\*(C`ACK_PAGER_COLOR\*(C'\fR. No output will be sent through a pager. .IP "\fB\-\-passthru\fR" 4 .IX Item "--passthru" 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: .Sp .Vb 2 \& # Watch a log file, and highlight a certain IP address \& $ tail \-f ~/access.log | ack \-\-passthru 123.45.67.89 .Ve .IP "\fB\-\-print0\fR" 4 .IX Item "--print0" Only works in conjunction with \-f, \-g, \-l or \-c (filename output). 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. .Sp .Vb 2 \& # remove all files of type html \& ack \-f \-\-html \-\-print0 | xargs \-0 rm \-f .Ve .IP "\fB\-Q\fR, \fB\-\-literal\fR" 4 .IX Item "-Q, --literal" Quote all metacharacters in \s-1PATTERN,\s0 it is treated as a literal. .IP "\fB\-r\fR, \fB\-R\fR, \fB\-\-recurse\fR" 4 .IX Item "-r, -R, --recurse" Recurse into sub-directories. This is the default and just here for compatibility with grep. You can also use it for turning \fB\-\-no\-recurse\fR off. .IP "\fB\-s\fR" 4 .IX Item "-s" Suppress error messages about nonexistent or unreadable files. This is taken from fgrep. .IP "\fB\-\-[no]smart\-case\fR, \fB\-\-no\-smart\-case\fR" 4 .IX Item "--[no]smart-case, --no-smart-case" Ignore case in the search strings if \s-1PATTERN\s0 contains no uppercase characters. This is similar to \f(CW\*(C`smartcase\*(C'\fR in vim. This option is off by default, and ignored if \f(CW\*(C`\-i\*(C'\fR is specified. .Sp \&\fB\-i\fR always overrides this option. .IP "\fB\-\-sort\-files\fR" 4 .IX Item "--sort-files" Sorts the found files lexicographically. Use this if you want your file listings to be deterministic between runs of \fIack\fR. .IP "\fB\-\-show\-types\fR" 4 .IX Item "--show-types" Outputs the filetypes that ack associates with each file. .Sp Works with \fB\-f\fR and \fB\-g\fR options. .IP "\fB\-\-type=[no]TYPE\fR" 4 .IX Item "--type=[no]TYPE" Specify the types of files to include or exclude from a search. \&\s-1TYPE\s0 is a filetype, like \fIperl\fR or \fIxml\fR. \fB\-\-type=perl\fR can also be specified as \fB\-\-perl\fR, and \fB\-\-type=noperl\fR can be done as \fB\-\-noperl\fR. .Sp If a file is of both type \*(L"foo\*(R" and \*(L"bar\*(R", specifying \-\-foo and \&\-\-nobar will exclude the file, because an exclusion takes precedence over an inclusion. .Sp Type specifications can be repeated and are ORed together. .Sp See \fIack \-\-help=types\fR for a list of valid types. .IP "\fB\-\-type\-add \f(BI\s-1TYPE\s0\fB:\f(BI\s-1FILTER\s0\fB:\f(BI\s-1FILTERARGS\s0\fB\fR" 4 .IX Item "--type-add TYPE:FILTER:FILTERARGS" Files with the given \s-1FILTERARGS\s0 applied to the given \s-1FILTER\s0 are recognized as being of (the existing) type \s-1TYPE.\s0 See also \*(L"Defining your own types\*(R". .IP "\fB\-\-type\-set \f(BI\s-1TYPE\s0\fB:\f(BI\s-1FILTER\s0\fB:\f(BI\s-1FILTERARGS\s0\fB\fR" 4 .IX Item "--type-set TYPE:FILTER:FILTERARGS" Files with the given \s-1FILTERARGS\s0 applied to the given \s-1FILTER\s0 are recognized as being of type \s-1TYPE.\s0 This replaces an existing definition for type \s-1TYPE.\s0 See also \*(L"Defining your own types\*(R". .IP "\fB\-\-type\-del \f(BI\s-1TYPE\s0\fB\fR" 4 .IX Item "--type-del TYPE" The filters associated with \s-1TYPE\s0 are removed from Ack, and are no longer considered for searches. .IP "\fB\-v\fR, \fB\-\-invert\-match\fR" 4 .IX Item "-v, --invert-match" Invert match: select non-matching lines .IP "\fB\-\-version\fR" 4 .IX Item "--version" Display version and copyright information. .IP "\fB\-w\fR, \fB\-\-word\-regexp\fR" 4 .IX Item "-w, --word-regexp" Turn on \*(L"words mode\*(R". This sometimes matches a whole word, but the semantics is quite subtle. If the passed regexp begins with a word character, then a word boundary is required before the match. If the passed regexp ends with a word character, or with a word character followed by newline, then a word boundary is required after the match. .Sp Thus, for example, \fB\-w\fR with the regular expression \f(CW\*(C`ox\*(C'\fR will not match the strings \f(CW\*(C`box\*(C'\fR or \f(CW\*(C`oxen\*(C'\fR. However, if the regular expression is \f(CW\*(C`(ox|ass)\*(C'\fR then it will match those strings. Because the regular expression's first character is \f(CW\*(C`(\*(C'\fR, the \fB\-w\fR flag has no effect at the start, and because the last character is \f(CW\*(C`)\*(C'\fR, it has no effect at the end. .Sp Force \s-1PATTERN\s0 to match only whole words. The \s-1PATTERN\s0 is wrapped with \&\f(CW\*(C`\eb\*(C'\fR metacharacters. .IP "\fB\-x\fR" 4 .IX Item "-x" An abbreviation for \fB\-\-files\-from=\-\fR; the list of files to search are read from standard input, with one line per file. .IP "\fB\-1\fR" 4 .IX Item "-1" Stops after reporting first match of any kind. This is different from \fB\-\-max\-count=1\fR or \fB\-m1\fR, where only one match per file is shown. Also, \fB\-1\fR works with \fB\-f\fR and \fB\-g\fR, where \fB\-m\fR does not. .IP "\fB\-\-thpppt\fR" 4 .IX Item "--thpppt" Display the all-important Bill The Cat logo. Note that the exact spelling of \fB\-\-thpppppt\fR is not important. It's checked against a regular expression. .IP "\fB\-\-bar\fR" 4 .IX Item "--bar" Check with the admiral for traps. .IP "\fB\-\-cathy\fR" 4 .IX Item "--cathy" Chocolate, Chocolate, Chocolate! .SH "THE .ackrc FILE" .IX Header "THE .ackrc FILE" The \fI.ackrc\fR 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 \fI.ackrc\fR might look like this: .PP .Vb 2 \& # Always sort the files \& \-\-sort\-files \& \& # Always color, even if piping to another program \& \-\-color \& \& # Use "less \-r" as my pager \& \-\-pager=less \-r .Ve .PP Note that arguments with spaces in them do not need to be quoted, as they are not interpreted by the shell. Basically, each \fIline\fR in the \fI.ackrc\fR file is interpreted as one element of \f(CW@ARGV\fR. .PP \&\fIack\fR looks in several locations for \fI.ackrc\fR files; the searching process is detailed in \*(L"\s-1ACKRC LOCATION SEMANTICS\*(R"\s0. These files are not considered if \fB\-\-noenv\fR is specified on the command line. .SH "Defining your own types" .IX Header "Defining your own types" ack allows you to define your own types in addition to the predefined types. This is done with command line options that are best put into an \fI.ackrc\fR file \- then you do not have to define your types over and over again. In the following examples the options will always be shown on one command line so that they can be easily copy & pasted. .PP File types can be specified both with the the \fI\-\-type=xxx\fR option, or the file type as an option itself. For example, if you create a filetype of \*(L"cobol\*(R", you can specify \fI\-\-type=cobol\fR or simply \&\fI\-\-cobol\fR. File types must be at least two characters long. This is why the C language is \fI\-\-cc\fR and the R language is \fI\-\-rr\fR. .PP \&\fIack \-\-perl foo\fR searches for foo in all perl files. \fIack \-\-help=types\fR tells you, that perl files are files ending in .pl, .pm, .pod or .t. So what if you would like to include .xs files as well when searching for \-\-perl files? \fIack \-\-type\-add perl:ext:xs \-\-perl foo\fR does this for you. \fB\-\-type\-add\fR appends additional extensions to an existing type. .PP If you want to define a new type, or completely redefine an existing type, then use \fB\-\-type\-set\fR. \fIack \-\-type\-set eiffel:ext:e,eiffel\fR defines the type \fIeiffel\fR to include files with the extensions .e or .eiffel. So to search for all eiffel files containing the word Bertrand use \fIack \-\-type\-set eiffel:ext:e,eiffel \-\-eiffel Bertrand\fR. As usual, you can also write \fB\-\-type=eiffel\fR instead of \fB\-\-eiffel\fR. Negation also works, so \fB\-\-noeiffel\fR excludes all eiffel files from a search. Redefining also works: \fIack \-\-type\-set cc:ext:c,h\fR and \fI.xs\fR files no longer belong to the type \fIcc\fR. .PP When defining your own types in the \fI.ackrc\fR file you have to use the following: .PP .Vb 1 \& \-\-type\-set=eiffel:ext:e,eiffel .Ve .PP or writing on separate lines .PP .Vb 2 \& \-\-type\-set \& eiffel:ext:e,eiffel .Ve .PP The following does \fB\s-1NOT\s0\fR work in the \fI.ackrc\fR file: .PP .Vb 1 \& \-\-type\-set eiffel:ext:e,eiffel .Ve .PP In order to see all currently defined types, use \fI\-\-help\-types\fR, e.g. \&\fIack \-\-type\-set backup:ext:bak \-\-type\-add perl:ext:perl \-\-help\-types\fR .PP In addition to filtering based on extension (like ack 1.x allowed), ack 2 offers additional filter types. The generic syntax is \&\fI\-\-type\-set \s-1TYPE:FILTER:FILTERARGS\s0\fR; \fI\s-1FILTERARGS\s0\fR depends on the value of \fI\s-1FILTER\s0\fR. .IP "is:\fI\s-1FILENAME\s0\fR" 4 .IX Item "is:FILENAME" \&\fIis\fR filters match the target filename exactly. It takes exactly one argument, which is the name of the file to match. .Sp Example: .Sp .Vb 1 \& \-\-type\-set make:is:Makefile .Ve .IP "ext:\fI\s-1EXTENSION\s0\fR[,\fI\s-1EXTENSION2\s0\fR[,...]]" 4 .IX Item "ext:EXTENSION[,EXTENSION2[,...]]" \&\fIext\fR filters match the extension of the target file against a list of extensions. No leading dot is needed for the extensions. .Sp Example: .Sp .Vb 1 \& \-\-type\-set perl:ext:pl,pm,t .Ve .IP "match:\fI\s-1PATTERN\s0\fR" 4 .IX Item "match:PATTERN" \&\fImatch\fR filters match the target filename against a regular expression. The regular expression is made case insensitive for the search. .Sp Example: .Sp .Vb 1 \& \-\-type\-set make:match:/(gnu)?makefile/ .Ve .IP "firstlinematch:\fI\s-1PATTERN\s0\fR" 4 .IX Item "firstlinematch:PATTERN" \&\fIfirstlinematch\fR matches the first line of the target file against a regular expression. Like \fImatch\fR, the regular expression is made case insensitive. .Sp Example: .Sp .Vb 1 \& \-\-type\-add perl:firstlinematch:/perl/ .Ve .PP More filter types may be made available in the future. .SH "ENVIRONMENT VARIABLES" .IX Header "ENVIRONMENT VARIABLES" For commonly-used ack options, environment variables can make life much easier. These variables are ignored if \fB\-\-noenv\fR is specified on the command line. .IP "\s-1ACKRC\s0" 4 .IX Item "ACKRC" Specifies the location of the user's \fI.ackrc\fR file. If this file doesn't exist, \fIack\fR looks in the default location. .IP "\s-1ACK_OPTIONS\s0" 4 .IX Item "ACK_OPTIONS" This variable specifies default options to be placed in front of any explicit options on the command line. .IP "\s-1ACK_COLOR_FILENAME\s0" 4 .IX Item "ACK_COLOR_FILENAME" Specifies the color of the filename when it's printed in \fB\-\-group\fR mode. By default, it's \*(L"bold green\*(R". .Sp The recognized attributes are clear, reset, dark, bold, underline, underscore, blink, reverse, concealed black, red, green, yellow, blue, magenta, on_black, on_red, on_green, on_yellow, on_blue, on_magenta, on_cyan, and on_white. Case is not significant. Underline and underscore are equivalent, as are clear and reset. The color alone sets the foreground color, and on_color sets the background color. .Sp This option can also be set with \fB\-\-color\-filename\fR. .IP "\s-1ACK_COLOR_MATCH\s0" 4 .IX Item "ACK_COLOR_MATCH" Specifies the color of the matching text when printed in \fB\-\-color\fR mode. By default, it's \*(L"black on_yellow\*(R". .Sp This option can also be set with \fB\-\-color\-match\fR. .Sp See \fB\s-1ACK_COLOR_FILENAME\s0\fR for the color specifications. .IP "\s-1ACK_COLOR_LINENO\s0" 4 .IX Item "ACK_COLOR_LINENO" Specifies the color of the line number when printed in \fB\-\-color\fR mode. By default, it's \*(L"bold yellow\*(R". .Sp This option can also be set with \fB\-\-color\-lineno\fR. .Sp See \fB\s-1ACK_COLOR_FILENAME\s0\fR for the color specifications. .IP "\s-1ACK_PAGER\s0" 4 .IX Item "ACK_PAGER" Specifies a pager program, such as \f(CW\*(C`more\*(C'\fR, \f(CW\*(C`less\*(C'\fR or \f(CW\*(C`most\*(C'\fR, to which ack will send its output. .Sp Using \f(CW\*(C`ACK_PAGER\*(C'\fR does not suppress grouping and coloring like piping output on the command-line does, except that on Windows ack will assume that \f(CW\*(C`ACK_PAGER\*(C'\fR does not support color. .Sp \&\f(CW\*(C`ACK_PAGER_COLOR\*(C'\fR overrides \f(CW\*(C`ACK_PAGER\*(C'\fR if both are specified. .IP "\s-1ACK_PAGER_COLOR\s0" 4 .IX Item "ACK_PAGER_COLOR" Specifies a pager program that understands \s-1ANSI\s0 color sequences. Using \f(CW\*(C`ACK_PAGER_COLOR\*(C'\fR does not suppress grouping and coloring like piping output on the command-line does. .Sp If you are not on Windows, you never need to use \f(CW\*(C`ACK_PAGER_COLOR\*(C'\fR. .SH "AVAILABLE COLORS" .IX Header "AVAILABLE COLORS" \&\fIack\fR uses the colors available in Perl's Term::ANSIColor module, which provides the following listed values. Note that case does not matter when using these values. .SS "Foreground colors" .IX Subsection "Foreground colors" .Vb 1 \& black red green yellow blue magenta cyan white \& \& bright_black bright_red bright_green bright_yellow \& bright_blue bright_magenta bright_cyan bright_white .Ve .SS "Background colors" .IX Subsection "Background colors" .Vb 2 \& on_black on_red on_green on_yellow \& on_blue on_magenta on_cyan on_white \& \& on_bright_black on_bright_red on_bright_green on_bright_yellow \& on_bright_blue on_bright_magenta on_bright_cyan on_bright_white .Ve .SH "ACK & OTHER TOOLS" .IX Header "ACK & OTHER TOOLS" .SS "Simple vim integration" .IX Subsection "Simple vim integration" \&\fIack\fR integrates easily with the Vim text editor. Set this in your \&\fI.vimrc\fR to use \fIack\fR instead of \fIgrep\fR: .PP .Vb 1 \& set grepprg=ack\e \-k .Ve .PP That example uses \f(CW\*(C`\-k\*(C'\fR to search through only files of the types ack knows about, but you may use other default flags. Now you can search with \fIack\fR and easily step through the results in Vim: .PP .Vb 1 \& :grep Dumper perllib .Ve .SS "Editor integration" .IX Subsection "Editor integration" Many users have integrated ack into their preferred text editors. For details and links, see . .SS "Shell and Return Code" .IX Subsection "Shell and Return Code" For greater compatibility with \fIgrep\fR, \fIack\fR in normal use returns shell return or exit code of 0 only if something is found and 1 if no match is found. .PP (Shell exit code 1 is \f(CW\*(C`$?=256\*(C'\fR in perl with \f(CW\*(C`system\*(C'\fR or backticks.) .PP The \fIgrep\fR code 2 for errors is not used. .PP If \f(CW\*(C`\-f\*(C'\fR or \f(CW\*(C`\-g\*(C'\fR are specified, then 0 is returned if at least one file is found. If no files are found, then 1 is returned. .SH "DEBUGGING ACK PROBLEMS" .IX Header "DEBUGGING ACK PROBLEMS" If ack gives you output you're not expecting, start with a few simple steps. .SS "Use \fB\-\-noenv\fP" .IX Subsection "Use --noenv" Your environment variables and \fI.ackrc\fR may be doing things you're not expecting, or forgotten you specified. Use \fB\-\-noenv\fR to ignore your environment and \fI.ackrc\fR. .SS "Use \fB\-f\fP to see what files have been selected" .IX Subsection "Use -f to see what files have been selected" Ack's \fB\-f\fR was originally added as a debugging tool. If ack is not finding matches you think it should find, run \fIack \-f\fR to see what files have been selected. You can also add the \f(CW\*(C`\-\-show\-types\*(C'\fR options to show the type of each file selected. .SS "Use \fB\-\-dump\fP" .IX Subsection "Use --dump" This lists the ackrc files that are loaded and the options loaded from them. So for example you can find a list of directories that do not get searched or where filetypes are defined. .SH "TIPS" .IX Header "TIPS" .SS "Use the \fI.ackrc\fP file." .IX Subsection "Use the .ackrc file." The \fI.ackrc\fR is the place to put all your options you use most of the time but don't want to remember. Put all your \-\-type\-add and \&\-\-type\-set definitions in it. If you like \-\-smart\-case, set it there, too. I also set \-\-sort\-files there. .SS "Use \fI\-f\fP for working with big codesets" .IX Subsection "Use -f for working with big codesets" Ack does more than search files. \f(CW\*(C`ack \-f \-\-perl\*(C'\fR will create a list of all the Perl files in a tree, ideal for sending into \fIxargs\fR. For example: .PP .Vb 2 \& # Change all "this" to "that" in all Perl files in a tree. \& ack \-f \-\-perl | xargs perl \-p \-i \-e\*(Aqs/this/that/g\*(Aq .Ve .PP or if you prefer: .PP .Vb 1 \& perl \-p \-i \-e\*(Aqs/this/that/g\*(Aq $(ack \-f \-\-perl) .Ve .SS "Use \fI\-Q\fP when in doubt about metacharacters" .IX Subsection "Use -Q when in doubt about metacharacters" If you're searching for something with a regular expression metacharacter, most often a period in a filename or \s-1IP\s0 address, add the \-Q to avoid false positives without all the backslashing. See the following example for more... .SS "Use ack to watch log files" .IX Subsection "Use ack to watch log files" Here's one I used the other day to find trouble spots for a website visitor. The user had a problem loading \fItroublesome.gif\fR, so I took the access log and scanned it with ack twice. .PP .Vb 1 \& ack \-Q aa.bb.cc.dd /path/to/access.log | ack \-Q \-B5 troublesome.gif .Ve .PP The first ack finds only the lines in the Apache log for the given \&\s-1IP.\s0 The second finds the match on my troublesome \s-1GIF,\s0 and shows the previous five lines from the log in each case. .SS "Examples of \fI\-\-output\fP" .IX Subsection "Examples of --output" Following variables are useful in the expansion string: .ie n .IP "$&" 4 .el .IP "\f(CW$&\fR" 4 .IX Item "$&" The whole string matched by \s-1PATTERN.\s0 .ie n .IP "$1, $2, ..." 4 .el .IP "\f(CW$1\fR, \f(CW$2\fR, ..." 4 .IX Item "$1, $2, ..." The contents of the 1st, 2nd ... bracketed group in \s-1PATTERN.\s0 .ie n .IP """$\`""" 4 .el .IP "\f(CW$\`\fR" 4 .IX Item "$" The string before the match. .ie n .IP """$\*(Aq""" 4 .el .IP "\f(CW$\*(Aq\fR" 4 .IX Item "$" The string after the match. .PP For more details and other variables see . .PP This example shows how to add text around a particular pattern (in this case adding _ around word with \*(L"e\*(R") .PP .Vb 4 \& ack2.pl "\ew*e\ew*" quick.txt \-\-output="$\`_$&_$\*(Aq" \& _The_ quick brown fox jumps over the lazy dog \& The quick brown fox jumps _over_ the lazy dog \& The quick brown fox jumps over _the_ lazy dog .Ve .PP This shows how to pick out particular parts of a match using ( ) within regular expression. .PP .Vb 3 \& ack \*(Aq=head(\ed+)\es+(.*)\*(Aq \-\-output=\*(Aq $1 : $2\*(Aq \& input file contains "=head1 NAME" \& output "1 : NAME" .Ve .SH "COMMUNITY" .IX Header "COMMUNITY" There are ack mailing lists and a Slack channel for ack. See for details. .SH "FAQ" .IX Header "FAQ" .SS "Why isn't ack finding a match in (some file)?" .IX Subsection "Why isn't ack finding a match in (some file)?" First, take a look and see if ack is even looking at the file. ack is intelligent in what files it will search and which ones it won't, but sometimes that can be surprising. .PP Use the \f(CW\*(C`\-f\*(C'\fR switch, with no regex, to see a list of files that ack will search for you. If your file doesn't show up in the list of files that \f(CW\*(C`ack \-f\*(C'\fR shows, then ack never looks in it. .PP \&\s-1NOTE:\s0 If you're using an old ack before 2.0, it's probably because it's of a type that ack doesn't recognize. In ack 1.x, the searching behavior is driven by filetype. \fBIf ack 1.x doesn't know what kind of file it is, ack ignores the file.\fR You can use the \f(CW\*(C`\-\-show\-types\*(C'\fR switch to show which type ack thinks each file is. .SS "Wouldn't it be great if \fIack\fP did search & replace?" .IX Subsection "Wouldn't it be great if ack did search & replace?" No, ack will always be read-only. Perl has a perfectly good way to do search & replace in files, using the \f(CW\*(C`\-i\*(C'\fR, \f(CW\*(C`\-p\*(C'\fR and \f(CW\*(C`\-n\*(C'\fR switches. .PP You can certainly use ack to select your files to update. For example, to change all \*(L"foo\*(R" to \*(L"bar\*(R" in all \s-1PHP\s0 files, you can do this from the Unix shell: .PP .Vb 1 \& $ perl \-i \-p \-e\*(Aqs/foo/bar/g\*(Aq $(ack \-f \-\-php) .Ve .SS "Can I make ack recognize \fI.xyz\fP files?" .IX Subsection "Can I make ack recognize .xyz files?" Yes! Please see \*(L"Defining your own types\*(R". If you think that \fIack\fR should recognize a type by default, please see \&\*(L"\s-1ENHANCEMENTS\*(R"\s0. .SS "There's already a program/package called ack." .IX Subsection "There's already a program/package called ack." Yes, I know. .SS "Why is it called ack if it's called ack-grep?" .IX Subsection "Why is it called ack if it's called ack-grep?" The name of the program is \*(L"ack\*(R". Some packagers have called it \&\*(L"ack-grep\*(R" when creating packages because there's already a package out there called \*(L"ack\*(R" that has nothing to do with this ack. .PP I suggest you make a symlink named \fIack\fR that points to \fIack-grep\fR because one of the crucial benefits of ack is having a name that's so short and simple to type. .PP To do that, run this with \fIsudo\fR or as root: .PP .Vb 1 \& ln \-s /usr/bin/ack\-grep /usr/bin/ack .Ve .PP Alternatively, you could use a shell alias: .PP .Vb 2 \& # bash/zsh \& alias ack=ack\-grep \& \& # csh \& alias ack ack\-grep .Ve .SS "What does \fIack\fP mean?" .IX Subsection "What does ack mean?" Nothing. I wanted a name that was easy to type and that you could pronounce as a single syllable. .SS "Can I do multi-line regexes?" .IX Subsection "Can I do multi-line regexes?" No, ack does not support regexes that match multiple lines. Doing so would require reading in the entire file at a time. .PP If you want to see lines near your match, use the \f(CW\*(C`\-\-A\*(C'\fR, \f(CW\*(C`\-\-B\*(C'\fR and \f(CW\*(C`\-\-C\*(C'\fR switches for displaying context. .ie n .SS "Why is ack telling me I have an invalid option when searching for ""+foo""?" .el .SS "Why is ack telling me I have an invalid option when searching for \f(CW+foo\fP?" .IX Subsection "Why is ack telling me I have an invalid option when searching for +foo?" ack treats command line options beginning with \f(CW\*(C`+\*(C'\fR or \f(CW\*(C`\-\*(C'\fR as options; if you would like to search for these, you may prefix your search term with \f(CW\*(C`\-\-\*(C'\fR or use the \f(CW\*(C`\-\-match\*(C'\fR option. (However, don't forget that \f(CW\*(C`+\*(C'\fR is a regular expression metacharacter!) .ie n .SS "Why does ""ack \*(Aq.{40000,}\*(Aq"" fail? Isn't that a valid regex?" .el .SS "Why does \f(CW``ack \*(Aq.{40000,}\*(Aq''\fP fail? Isn't that a valid regex?" .IX Subsection "Why does ""ack .{40000,}"" fail? Isn't that a valid regex?" The Perl language limits the repetition quantifier to 32K. You can search for \f(CW\*(C`.{32767}\*(C'\fR but not \f(CW\*(C`.{32768}\*(C'\fR. .ie n .SS "Ack does ""X"" and shouldn't, should it?" .el .SS "Ack does ``X'' and shouldn't, should it?" .IX Subsection "Ack does X and shouldn't, should it?" We try to remain as close to grep's behavior as possible, so when in doubt, see what grep does! If there's a mismatch in functionality there, please bring it up on the ack-users mailing list. .SH "ACKRC LOCATION SEMANTICS" .IX Header "ACKRC LOCATION SEMANTICS" Ack can load its configuration from many sources. The following list specifies the sources Ack looks for configuration files; each one that is found is loaded in the order specified here, and each one overrides options set in any of the sources preceding it. (For example, if I set \-\-sort\-files in my user ackrc, and \&\-\-nosort\-files on the command line, the command line takes precedence) .IP "\(bu" 4 Defaults are loaded from App::Ack::ConfigDefaults. This can be omitted using \f(CW\*(C`\-\-ignore\-ack\-defaults\*(C'\fR. .IP "\(bu" 4 Global ackrc .Sp Options are then loaded from the global ackrc. This is located at \&\f(CW\*(C`/etc/ackrc\*(C'\fR on Unix-like systems. .Sp Under Windows \s-1XP\s0 and earlier, the global ackrc is at \&\f(CW\*(C`C:\eDocuments and Settings\eAll Users\eApplication Data\eackrc\*(C'\fR .Sp Under Windows Vista/7, the global ackrc is at \&\f(CW\*(C`C:\eProgramData\eackrc\*(C'\fR .Sp The \f(CW\*(C`\-\-noenv\*(C'\fR option prevents all ackrc files from being loaded. .IP "\(bu" 4 User ackrc .Sp Options are then loaded from the user's ackrc. This is located at \&\f(CW\*(C`$HOME/.ackrc\*(C'\fR on Unix-like systems. .Sp Under Windows \s-1XP\s0 and earlier, the user's ackrc is at \&\f(CW\*(C`C:\eDocuments and Settings\e$USER\eApplication Data\eackrc\*(C'\fR. .Sp Under Windows Vista/7, the user's ackrc is at \&\f(CW\*(C`C:\eUsers\e$USER\eAppData\eRoaming\eackrc\*(C'\fR. .Sp If you want to load a different user-level ackrc, it may be specified with the \f(CW$ACKRC\fR environment variable. .Sp The \f(CW\*(C`\-\-noenv\*(C'\fR option prevents all ackrc files from being loaded. .IP "\(bu" 4 Project ackrc .Sp Options are then loaded from the project ackrc. The project ackrc is the first ackrc file with the name \f(CW\*(C`.ackrc\*(C'\fR or \f(CW\*(C`_ackrc\*(C'\fR, first searching in the current directory, then the parent directory, then the grandparent directory, etc. This can be omitted using \f(CW\*(C`\-\-noenv\*(C'\fR. .IP "\(bu" 4 \&\-\-ackrc .Sp The \f(CW\*(C`\-\-ackrc\*(C'\fR option may be included on the command line to specify an ackrc file that can override all others. It is consulted even if \f(CW\*(C`\-\-noenv\*(C'\fR is present. .IP "\(bu" 4 \&\s-1ACK_OPTIONS\s0 .Sp Options are then loaded from the environment variable \f(CW\*(C`ACK_OPTIONS\*(C'\fR. This can be omitted using \f(CW\*(C`\-\-noenv\*(C'\fR. .IP "\(bu" 4 Command line .Sp Options are then loaded from the command line. .SH "DIFFERENCES BETWEEN ACK 1.X AND ACK 2.X" .IX Header "DIFFERENCES BETWEEN ACK 1.X AND ACK 2.X" A lot of changes were made for ack 2; here is a list of them. .SS "\s-1GENERAL CHANGES\s0" .IX Subsection "GENERAL CHANGES" .IP "\(bu" 4 When no selectors are specified, ack 1.x only searches through files that it can map to a file type. ack 2.x, by contrast, will search through every regular, non-binary file that is not explicitly ignored via \&\fB\-\-ignore\-file\fR or \fB\-\-ignore\-dir\fR. This is similar to the behavior of the \&\fB\-a/\-\-all\fR option in ack 1.x. .IP "\(bu" 4 A more flexible filter system has been added, so that more powerful file types may be created by the user. For details, please consult \&\*(L"Defining your own types\*(R". .IP "\(bu" 4 ack now loads multiple ackrc files; see \*(L"\s-1ACKRC LOCATION SEMANTICS\*(R"\s0 for details. .IP "\(bu" 4 ack's default filter definitions aren't special; you may tell ack to completely disregard them if you don't like them. .SS "\s-1REMOVED OPTIONS\s0" .IX Subsection "REMOVED OPTIONS" .IP "\(bu" 4 Because of the change in default search behavior, the \fB\-a/\-\-all\fR and \&\fB\-u/\-\-unrestricted\fR options have been removed. In addition, the \&\fB\-k/\-\-known\-types\fR option was added to cause ack to behave with the default search behavior of ack 1.x. .IP "\(bu" 4 The \fB\-G\fR option has been removed. Two regular expressions on the command line was considered too confusing; to simulate \fB\-G\fR's functionality, you may use the new \fB\-x\fR option to pipe filenames from one invocation of ack into another. .IP "\(bu" 4 The \fB\-\-binary\fR option has been removed. .IP "\(bu" 4 The \fB\-\-skipped\fR option has been removed. .IP "\(bu" 4 The \fB\-\-text\fR option has been removed. .IP "\(bu" 4 The \fB\-\-invert\-file\-match\fR option has been removed. Instead, you may use \fB\-v\fR with \fB\-g\fR. .SS "\s-1CHANGED OPTIONS\s0" .IX Subsection "CHANGED OPTIONS" .IP "\(bu" 4 The options that modify the regular expression's behavior (\fB\-i\fR, \fB\-w\fR, \&\fB\-Q\fR, and \fB\-v\fR) may now be used with \fB\-g\fR. .SS "\s-1ADDED OPTIONS\s0" .IX Subsection "ADDED OPTIONS" .IP "\(bu" 4 \&\fB\-\-files\-from\fR was added so that a user may submit a list of filenames as a list of files to search. .IP "\(bu" 4 \&\fB\-x\fR was added to tell ack to accept a list of filenames via standard input; this list is the list of filenames that will be used for the search. .IP "\(bu" 4 \&\fB\-s\fR was added to tell ack to suppress error messages about non-existent or unreadable files. .IP "\(bu" 4 \&\fB\-\-ignore\-directory\fR and \fB\-\-noignore\-directory\fR were added as aliases for \&\fB\-\-ignore\-dir\fR and \fB\-\-noignore\-dir\fR respectively. .IP "\(bu" 4 \&\fB\-\-ignore\-file\fR was added so that users may specify patterns of files to ignore (ex. /.*~$/). .IP "\(bu" 4 \&\fB\-\-dump\fR was added to allow users to easily find out which options are set where. .IP "\(bu" 4 \&\fB\-\-create\-ackrc\fR was added so that users may create custom ackrc files based on the default settings loaded by ack, and so that users may easily view those defaults. .IP "\(bu" 4 \&\fB\-\-type\-del\fR was added to selectively remove file type definitions. .IP "\(bu" 4 \&\fB\-\-ignore\-ack\-defaults\fR was added so that users may ignore ack's default options in favor of their own. .IP "\(bu" 4 \&\fB\-\-bar\fR was added so ack users may consult Admiral Ackbar. .SH "AUTHOR" .IX Header "AUTHOR" Andy Lester, \f(CW\*(C`\*(C'\fR .SH "BUGS" .IX Header "BUGS" Please report any bugs or feature requests to the issues list at Github: .SH "ENHANCEMENTS" .IX Header "ENHANCEMENTS" All enhancement requests \s-1MUST\s0 first be posted to the ack-users mailing list at . I will not consider a request without it first getting seen by other ack users. This includes requests for new filetypes. .PP There is a list of enhancements I want to make to \fIack\fR in the ack issues list at Github: .PP Patches are always welcome, but patches with tests get the most attention. .SH "SUPPORT" .IX Header "SUPPORT" Support for and information about \fIack\fR can be found at: .IP "\(bu" 4 The ack homepage .Sp .IP "\(bu" 4 The ack-users mailing list .Sp .IP "\(bu" 4 The ack issues list at Github .Sp .IP "\(bu" 4 AnnoCPAN: Annotated \s-1CPAN\s0 documentation .Sp .IP "\(bu" 4 \&\s-1CPAN\s0 Ratings .Sp .IP "\(bu" 4 Search \s-1CPAN\s0 .Sp .IP "\(bu" 4 MetaCPAN .Sp .IP "\(bu" 4 Git source repository .Sp .SH "ACKNOWLEDGEMENTS" .IX Header "ACKNOWLEDGEMENTS" How appropriate to have \fIack\fRnowledgements! .PP Thanks to everyone who has contributed to ack in any way, including Tim Gim Yee, Michele Campeotto, H.Merijn Brand, Duke Leto, Gerhard Poul, Ethan Mallove, Marek Kubica, Ray Donnelly, Nikolaj Schumacher, Ed Avis, Nick Morrott, Austin Chamberlin, Varadinsky, Sébastien Feugère, Jakub Wilk, Pete Houston, Stephen Thirlwall, Jonah Bishop, Chris Rebert, Denis Howe, Raúl Gundín, James McCoy, Daniel Perrett, Steven Lee, Jonathan Perret, Fraser Tweedale, Raál Gundán, Steffen Jaeckel, Stephan Hohe, Michael Beijen, Alexandr Ciornii, Christian Walde, Charles Lee, Joe McMahon, John Warwick, David Steinbrunner, Kara Martens, Volodymyr Medvid, Ron Savage, Konrad Borowski, Dale Sedivic, Michael McClimon, Andrew Black, Ralph Bodenner, Shaun Patterson, Ryan Olson, Shlomi Fish, Karen Etheridge, Olivier Mengue, Matthew Wild, Scott Kyle, Nick Hooey, Bo Borgerson, Mark Szymanski, Marq Schneider, Packy Anderson, \&\s-1JR\s0 Boyens, Dan Sully, Ryan Niebur, Kent Fredric, Mike Morearty, Ingmar Vanhassel, Eric Van Dewoestine, Sitaram Chamarty, Adam James, Richard Carlsson, Pedro Melo, \&\s-1AJ\s0 Schuster, Phil Jackson, Michael Schwern, Jan Dubois, Christopher J. Madsen, Matthew Wickline, David Dyck, Jason Porritt, Jjgod Jiang, Thomas Klausner, Uri Guttman, Peter Lewis, Kevin Riggle, Ori Avtalion, Torsten Blix, Nigel Metheringham, Gábor Szabó, Tod Hagan, Michael Hendricks, Ævar Arnfjörð Bjarmason, Piers Cawley, Stephen Steneker, Elias Lutfallah, Mark Leighton Fisher, Matt Diephouse, Christian Jaeger, Bill Sully, Bill Ricker, David Golden, Nilson Santos F. Jr, Elliot Shank, Merijn Broeren, Uwe Voelker, Rick Scott, Ask Bjørn Hansen, Jerry Gay, Will Coleda, Mike O'Regan, Slaven Rezić, Mark Stosberg, David Alan Pisoni, Adriano Ferreira, James Keenan, Leland Johnson, Ricardo Signes, Pete Krawczyk and Rob Hoelz. .SH "COPYRIGHT & LICENSE" .IX Header "COPYRIGHT & LICENSE" Copyright 2005\-2019 Andy Lester. .PP This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License v2.0. .PP See http://www.perlfoundation.org/artistic_license_2_0 or the \s-1LICENSE\s0.md file that comes with the ack distribution.