Skip to content
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

feat: include OSC8 escape codes in output #1530

Open
WhyNotHugo opened this issue Aug 24, 2023 · 0 comments
Open

feat: include OSC8 escape codes in output #1530

WhyNotHugo opened this issue Aug 24, 2023 · 0 comments

Comments

@WhyNotHugo
Copy link

In recent times, terminals have adopted a feature which allows clients to indicate that a given portion of text is a hyperlink. See: https://github.com/Alhadis/OSC8-Adoption/ and https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda

This links can use the file:// scheme to point to local files.

If ag included these escape codes in its output, this could be very useful for quickly interacting with results:

  • Keyboard driven terminals usually have a shortcut to open such links very quickly.
  • Mouse/touch oriented terminals would allow users to click/tap of files in results and interact with them.

How the files themselves are opened after human interaction depends on the terminal implementation and its configuration, so it mostly out of scope here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant