GNU bug report logs - #62639
RFE: Option to print file paths as hyperlinks

Previous Next

Package: grep;

Reported by: Nelson Benítez León <nbenitezl <at> gmail.com>

Date: Mon, 3 Apr 2023 05:37:03 UTC

Severity: normal

To reply to this bug, email your comments to 62639 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-grep <at> gnu.org:
bug#62639; Package grep. (Mon, 03 Apr 2023 05:37:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nelson Benítez León <nbenitezl <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-grep <at> gnu.org. (Mon, 03 Apr 2023 05:37:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nelson Benítez León <nbenitezl <at> gmail.com>
To: bug-grep <at> gnu.org
Subject: RFE: Option to print file paths as hyperlinks
Date: Sun, 2 Apr 2023 22:38:49 -0400
Most terminals have landed support for hyperlinks:
https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda

It would be nice if GNU Grep added an option for that so it could
print file paths as hyperlinks, that way the user could eg. configure
it such that clicking on a match would open text editor for such file
and at the giving line number.

For example, VS Code now provides an URL handler[1] for that, so if
GNU grep provided a '--hyperlink-format' option, it could be used as
easy as:
--hyperlink-format 'vscode://file/{file}:{line}'

and that way we could launch our GNU grep matches directly in VS Code
(or any other editor by configuring the file:// handler in our
system).

[1] https://code.visualstudio.com/docs/editor/command-line#_opening-vs-code-with-urls

Regards,




This bug report was last modified 1 year and 223 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.