Skip to content

Add support for OSC8 hyperlinks in TTY outputΒ #63082

@matthieusieben

Description

@matthieusieben

πŸ” Search Terms

"OSC8", "hyperlinks", "terminal emulator", "tty", "build output"

βœ… Viability Checklist

⭐ Suggestion

Wrap file paths from build output with OSC8 hyperlink markers.

πŸ“ƒ Motivating Example

When the build output contains errors, it is convenient to be able to CMD+click on files path to directly see the error in the editor.

Most modern terminal emulators (iTerm, Ghostty, tmux, etc.) support CMD+clicking on file names in order to open them in the default app. These terminals use two different approaches to enable this; OSC8 hyperlinks and RegExp. The issue with the Regexp based approach is that their behavior is inconsistent across terminal implementations, making them unreliable. OSC8 hyperlinks, on the other hand, are unambiguous and reliable.

πŸ’» Use Cases

  1. What do you want to use this for?
    When building a TS project, a change in a dependency might cause issues in dependent code, causing tsc build to return errors.

  2. What shortcomings exist with current approaches?
    Currently, I can sometimes CMD+click the filename, but this often fails (because the terminal does not properly infer the actual file location using the RegExp based method)

  3. What workarounds are you using in the meantime?
    Manually copy the file path in the terminal output + Manually open IDE + Manually open file

Metadata

Metadata

Assignees

No one assigned

    Labels

    Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions