Add options for linking different parts of ripgrep output

This commit is contained in:
Charlie Groves
2022-08-29 13:04:13 -04:00
parent 8c7968a4d6
commit db5b4da388
2 changed files with 36 additions and 11 deletions

View File

@@ -74,9 +74,13 @@ to :program:`rg`. How to do that varies based on the shell:
To learn more about kitty's powerful framework for customizing URL click
actions, see :doc:`here </open_actions>`.
By default, this adds hyperlinks for several parts of ripgrep output: the
per-file header, match context lines, and match lines. Passing the
`--hyperlink-only-matches` flag will only add hyperlinks to the match lines.
By default, this adds hyperlinks for several parts of ripgrep output: the
per-file header, match context lines, and match lines. You can control which
items are linked with a :command:`--kitten hyperlink` flag. For example,
:command:`--kitten hyperlink=matching_lines` will only add hyperlinks to the
match lines. :command:`--kitten hyperlink=file_headers,context_lines` will
link file headers and context lines but not match lines.
:command:`--kitten hyperlink` may be specified multiple times.
Hopefully, someday this functionality will make it into some `upstream grep
<https://github.com/BurntSushi/ripgrep/issues/665>`__ program directly removing