id = "ack" name = "ack" homepage = "https://beyondgrep.com" description = "ack is a grep-like search tool optimized for source code." # The ack cat, the ASCII mascot on beyondgrep.com, as the beyondgrep # organisation's avatar — the project publishes no image file of it. icon = "https://github.com/beyondgrep.png" executables = ["ack"] [dotfiles] # The ACKRC section of the ack manual # (https://metacpan.org/dist/ack/view/ack, the same text `ack --man` prints): # the user-level file is "$HOME/.ackrc on Unix-like systems", and on Windows # "C:\Users\$USER\AppData\Roaming\ackrc" — %APPDATA%\ackrc, spelled without the # leading dot, which is why the two lines are not one named base directory. # $ACKRC names a different file when it is set. The system-wide /etc/ackrc and # the project .ackrc / _ackrc that ack walks up the tree to find are not # user-level and are left out. paths = ["~/.ackrc", "%APPDATA%/ackrc"] exclude = [] # An ackrc is default switches, --type-set definitions and --ignore-dir rules. # Nothing in it is a credential. secret = [] # Same page: the ackrc files are read on every invocation, so a rewrite between # runs is picked up by the next one and nothing holds the file open. side_effect = false # No machine_lines: --type-set, --ignore-dir and the default switches are the # preferences a user wants on every machine, and --ignore-dir takes a directory # *name* rather than an absolute path, so there is nothing machine-local to # strip. [commands] format = 1 label = "Search files" description = "Search a directory tree for a pattern with ack, skipping VCS and binary files. Listing-only modes, file-type filters and ignore-dir management are partly covered." quality = "ai-draft" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = true } [[commands.source]] id = "help" kind = "help" url = "https://beyondgrep.com/documentation/" revision = "2026-10-27" evidence = """ -i, --ignore-case Ignore case distinctions in PATTERN -S, --[no]smart-case Ignore case distinctions in PATTERN, only if PATTERN contains no upper case. -w, --word-regexp Force PATTERN to match only whole words -Q, --literal Quote all metacharacters; PATTERN is literal -v, --invert-match Invert match: select non-matching lines -l, --files-with-matches Print filenames with at least one match -L, --files-without-matches Print filenames with no matches -c, --count Print filenames and count of matching lines -A NUM, --after-context=NUM Print NUM lines of trailing context after matching lines. -B NUM, --before-context=NUM Print NUM lines of leading context before matching lines. -C [NUM], --context[=NUM] Print NUM lines (default 2) of output context. -t X, --type=X Include only X files, where X is a filetype -h, --no-filename Suppress the prefixing filename on output -H, --with-filename Print the filename for each match -1 Stop searching after one match of any kind --[no]color, --[no]colour Highlight the matching text """ [[commands.field]] id = "pattern" label = "Pattern" type = "string" position = 0 min = 1 sources = ["help"] [[commands.field]] id = "paths" label = "Files or directories" description = "Defaults to the current directory when empty." type = "path" path = { kind = "any", role = "input" } position = 1 multiple = true sources = ["help"] [[commands.field]] id = "ignore_case" label = "Ignore case" type = "boolean" option = ["--ignore-case", "-i"] sources = ["help"] [[commands.field]] id = "smart_case" label = "Smart case" description = "Ignore case only if the pattern has no upper-case letters." type = "boolean" option = ["-S"] sources = ["help"] [[commands.field]] id = "word" label = "Whole words only" type = "boolean" option = ["--word-regexp", "-w"] sources = ["help"] [[commands.field]] id = "literal" label = "Literal pattern" type = "boolean" option = ["--literal", "-Q"] sources = ["help"] [[commands.field]] id = "invert" label = "Invert match" type = "boolean" option = ["--invert-match", "-v"] sources = ["help"] [[commands.field]] id = "files_with_matches" label = "List matching files only" type = "boolean" option = ["--files-with-matches", "-l"] sources = ["help"] [[commands.field]] id = "count" label = "Count matches per file" type = "boolean" option = ["--count", "-c"] sources = ["help"] [[commands.field]] id = "after" label = "Lines after" type = "integer" option = ["--after-context", "-A"] sources = ["help"] [[commands.field]] id = "before" label = "Lines before" type = "integer" option = ["--before-context", "-B"] sources = ["help"] [[commands.field]] id = "file_type" label = "File type" description = "Only search files of this ack file type." type = "string" option = ["--type", "-t"] suggestions = [{ value = "perl", label = "Perl" }, { value = "python", label = "Python" }, { value = "js", label = "JavaScript" }, { value = "cc", label = "C" }] sources = ["help"] [[commands.task]] id = "search" label = "Search for a pattern" fields = ["pattern", "paths", "ignore_case", "word", "file_type"] required = ["pattern"] [[commands.task]] id = "list-files" label = "List files containing a match" set = { files_with_matches = [true] } lock = ["files_with_matches"] fields = ["pattern", "paths", "files_with_matches", "file_type"] required = ["pattern"] [[commands.group]] id = "basic" label = "Basic" fields = ["pattern", "paths", "ignore_case", "smart_case", "word", "literal", "file_type"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["invert", "files_with_matches", "count", "after", "before"]