New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a --hyperlink-only-matches flag to hyperlinked_grep #5428
Add a --hyperlink-only-matches flag to hyperlinked_grep #5428
Conversation
If it's active, only matching lines get links, not file headers or context lines.
Add some docs for this to hyperlinked_grep.rst |
I would suggest adding a prefix to the kitten options, just like the It would be nice if this option could accept more than one value. (all,file_path,context_line,match_line,match_text) kitty +kitten hyperlinked_grep --kitten hyperlink=file_path --kitten hyperlink=match_text If there are examples in the documentation, then the user will know how to use it with other ripgrep options, such as |
Done.
I was thinking the
I can't think of a reason why I'd want those other options. Do you have a use in mind? |
I am interested in file paths and matching lines for hyperlinks. When pressing |
I don't think so. What prevents conflicts is the
So someday This For all kitten wrapping another program, having uniform parameters for configuring additional options would reduce the user's cognitive and ease of use, and would not require each kitten to implement its own argument parsing logic. So the user clearly knows that it's for kitten, not ripgrep. |
e8b3cd1
to
db5b4da
Compare
Added three options for hyperlinking: |
Merged, with a few minor changes. |
If it's active, only matching lines get links, not file headers or context lines.
I have a kitten that steps through the links it finds to open them like "Find Next" when searching for text in a browser. It's way more useful if the links are only to the lines the search hits, which is what this flag enables.