kovidgoyal/kitty · error
Failed to parse rg help output, could not find any options
Error message
Failed to parse rg help output, could not find any options
What it means
After scanning all of `rg --help`, the parser collected no options or no alias mappings at all — the OPTIONS section was never found or matched nothing. This is the wholesale failure counterpart to the per-line error.
Source
Thrown at kittens/hyperlinked_grep/main.go:79
err = fmt.Errorf("Failed to parse rg help output line: %s", line)
return
}
for _, x := range single_letter_aliases {
alias_map[x] = long_option_names[0]
}
for _, x := range long_option_names[1:] {
alias_map[x] = long_option_names[0]
}
expecting_args[long_option_names[0]] = expecting_arg
}
} else {
if strings.HasSuffix(line, "OPTIONS:") {
options_started = true
}
}
}
if len(expecting_args) == 0 || len(alias_map) == 0 {
err = fmt.Errorf("Failed to parse rg help output, could not find any options")
return
}
return
}
type kitten_options struct {
matching_lines, context_lines, file_headers bool
with_filename, heading, line_number bool
stats, count, count_matches bool
files, files_with_matches, files_without_match bool
vimgrep bool
}
func default_kitten_opts() *kitten_options {
return &kitten_options{
matching_lines: true, context_lines: true, file_headers: true,
with_filename: true, heading: true, line_number: true,
}View on GitHub (pinned to 6d5d0c4406)
Solutions
- Verify `rg --help | grep 'OPTIONS:'` returns a section header in your environment
- Update kitty to a release matching your installed ripgrep version
- Remove wrappers around rg so the kitten executes the real binary
Example fix
# before: rg is a wrapper alias rg='my_rg_wrapper' # after: point PATH at real ripgrep export PATH="/usr/bin:$PATH"
Defensive patterns
Strategy: fallback
Validate before calling
if out, _ := exec.Command("rg","--help").Output(); !strings.Contains(string(out), "OPTIONS:") { /* skip kitten, run rg directly */ } Prevention
- Don't shadow rg with wrapper scripts/aliases
- Verify rg --help contains an OPTIONS: section after upgrades
When it happens
Trigger: rg --help output lacking a line ending in 'OPTIONS:' (major help-format change), empty output, or a non-ripgrep binary responding differently.
Common situations: rg replaced by an alias/wrapper (e.g. a shell function or a different tool); extremely old/new ripgrep with different help layout; truncated output from a wrapper script.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
Related errors
- Failed to parse rg help output line: %s
- Failed to find libxkbcommon
- Extra characters at end of search
- {path} is not a supported shell
- Failed to find the kitty executable, this kitten requires th
AI-assisted analysis of kovidgoyal/kitty@6d5d0c4406 (2026-08-27).
Data as JSON: /api/errors/f2a20728eaadee61.
Report an issue: GitHub.