The notes state that the headline feature is "hyperlink support". However, the notes don't seem to really explain what that means. Can someone explain a bit more about what that feature does/is? What's a use case?
So, when you search for "foo" in mydir/, rg can find the term foo inside different places in a number of files, and then print the results like:
mydir/myfile.java
15: return foo;
78: System.out.println(foo);
123: // TODO: change foo to bar
Hyperlink support means that the line numbers (15, 78, 123) are clickable, and will open your favorite editor to that file and that line number.
That's if your terminal supports hyperlinks, or has hyperlink support enabled - most do. Depending on the terminal app it might be control/cmd click, or option-click to open the hyperlink.
Note (this got me while trying): hyperlinks are not emitted when you search inside a specific file directly, e.g. "rg foo myfile.py".
I'm fascinated! I've been living with and authoring CLI tools for about a decade now and I didn't know that there's widespread support for additional attributes on text besides styling (color, italics, underline, etc) in common terminal emulators. What a cool thing!
Terminals (some terminals) support hyperlinks and it creates clickable links. For example ls -l --hyperlink=auto If you terminal supports it, you can click the names.
That's if your terminal supports hyperlinks, or has hyperlink support enabled - most do. Depending on the terminal app it might be control/cmd click, or option-click to open the hyperlink.
Note (this got me while trying): hyperlinks are not emitted when you search inside a specific file directly, e.g. "rg foo myfile.py".