id = "rg" name = "ripgrep" description = "Recursively search files for lines matching a regular expression." executables = ["rg"] [commands] format = 1 label = "Search files" description = "Search a directory tree for a pattern with ripgrep. Covers common matching, context and filtering flags only." quality = "ai-draft" base = "fig:rg" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = true } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/rg.ts" license = "MIT" [[commands.field]] id = "pattern" label = "Pattern" type = "string" position = 0 sources = ["fig"] [[commands.field]] id = "paths" label = "Files or directories" type = "path" position = 1 multiple = true path = { kind = "any", role = "input" } sources = ["fig"] [[commands.field]] id = "ignore_case_smart" label = "Smart case" type = "boolean" option = ["-S", "--smart-case"] sources = ["fig"] [[commands.field]] id = "case_sensitive" label = "Case sensitive" type = "boolean" option = ["-s", "--case-sensitive"] sources = ["fig"] [[commands.field]] id = "fixed_strings" label = "Literal string" type = "boolean" option = ["-F", "--fixed-strings"] sources = ["fig"] [[commands.field]] id = "word" label = "Whole words only" type = "boolean" option = ["-w", "--word-regexp"] sources = ["fig"] [[commands.field]] id = "invert" label = "Invert match" type = "boolean" option = ["-v", "--invert-match"] sources = ["fig"] [[commands.field]] id = "files_with_matches" label = "List matching files only" type = "boolean" option = ["-l", "--files-with-matches"] sources = ["fig"] [[commands.field]] id = "count" label = "Count matching lines" type = "boolean" option = ["-c", "--count"] sources = ["fig"] [[commands.field]] id = "context" label = "Context lines" type = "integer" option = ["-C", "--context"] sources = ["fig"] [[commands.field]] id = "glob" label = "Include or exclude glob" type = "string" option = ["-g", "--glob"] multiple = true sources = ["fig"] [[commands.field]] id = "file_type" label = "File type" type = "string" option = ["-t", "--type"] multiple = true sources = ["fig"] [[commands.field]] id = "hidden" label = "Include hidden files" type = "boolean" option = ["--hidden"] sources = ["fig"] [[commands.field]] id = "no_ignore" label = "Ignore .gitignore rules" type = "boolean" option = ["--no-ignore"] sources = ["fig"] [[commands.task]] id = "search" label = "Search with smart case" set = { ignore_case_smart = [true] } fields = ["pattern", "paths", "ignore_case_smart", "glob", "file_type", "context"] 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", "hidden"] required = ["pattern"] [[commands.group]] id = "basic" label = "Basic" fields = ["pattern", "paths", "ignore_case_smart", "case_sensitive", "fixed_strings", "word", "context", "glob", "file_type"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["invert", "files_with_matches", "count", "hidden", "no_ignore"]