Turn arbitrary text into a hyperlink #12214

Closed
opened 2026-01-31 03:09:15 +00:00 by claunia · 2 comments
Owner

Originally created by @oxo42 on GitHub (Jan 26, 2021).

Turn arbitrary text into a hyperlink

As of Windows Terminal Preview 1.4 (I think) you can Ctrl+click on text that matches a URL and it will open in a browser. This feature request would be to match on certain text and turn that into a clickable link using some of the text as a parameter.

Example

Let's say the following is on the terminal, from the output of git log

Fixes issue in T1234

I would like to setup a regex \b(T\d+)\b and when I Ctrl+click on T1234, open up https://example.com/tasks/T1234.

I would like this to be configured in settings.json something like

"arbitrarylinks": [
    {
        "pattern": "\\b(T\\d+)\\b",
        "link": "https://example.com/tasks/$1"
    }
]

Not OSC-8

This is not OSC-8. I don't have the ability to re-write text so OSC-8 can't be used. My use case is primarily source control logs.

Originally created by @oxo42 on GitHub (Jan 26, 2021). # Turn arbitrary text into a hyperlink As of Windows Terminal Preview 1.4 (I think) you can Ctrl+click on text that matches a URL and it will open in a browser. This feature request would be to match on certain text and turn that into a clickable link using some of the text as a parameter. ## Example Let's say the following is on the terminal, from the output of `git log` ``` Fixes issue in T1234 ``` I would like to setup a regex `\b(T\d+)\b` and when I Ctrl+click on `T1234`, open up `https://example.com/tasks/T1234`. I would like this to be configured in `settings.json` something like ``` "arbitrarylinks": [ { "pattern": "\\b(T\\d+)\\b", "link": "https://example.com/tasks/$1" } ] ``` ## Not OSC-8 This is not [OSC-8](https://github.com/microsoft/terminal/issues/204). I don't have the ability to re-write text so OSC-8 can't be used. My use case is primarily source control logs.
claunia added the Issue-FeatureResolution-Duplicate labels 2026-01-31 03:09:15 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Jan 26, 2021):

Alright so I've moved this discussion to #8849, because we're gonna make this a general-purpose solution to both problems. Thanks!

/dup #8849

@zadjii-msft commented on GitHub (Jan 26, 2021): Alright so I've moved this discussion to #8849, because we're gonna make this a general-purpose solution to both problems. Thanks! /dup #8849
Author
Owner

@ghost commented on GitHub (Jan 26, 2021):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Jan 26, 2021): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#12214