id = "ack"
name = "ack"
homepage = "https://beyondgrep.com"
description = "ack is a grep-like search tool optimized for source code."
icon = "https://github.com/beyondgrep.png"
executables = ["ack"]
[dotfiles]
paths = ["~/.ackrc", "%APPDATA%/ackrc"]
exclude = []
secret = []
side_effect = false
[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"]