Skip to content

feat: add link method for terminal hyperlinks (OSC 8) #44

@privatenumber

Description

@privatenumber

Feature request

What is motivation or use case for adding/changing the behavior?

Terminal hyperlinks (OSC 8) are part of the ANSI escape sequence family. Since this package is ansis, it feels within scope.

Describe the solution you'd like

import ansis, { link } from 'ansis';

link('Click here', 'https://example.com')
ansis.blue.link('Docs', 'https://example.com/docs')

Describe alternatives you've considered

Manually constructing OSC 8 sequences or using terminal-link.

Appreciation for the useful project

  • After the feature is implemented, do not forget to give a star ⭐

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions