Skip to content

This library provides clickable terminal links for terminals that support them. It is designed to seamlessly replace popular terminal-link

License

Notifications You must be signed in to change notification settings

king8fisher/termi-link

Repository files navigation

npm version

termi-link

This library provides clickable terminal links for terminals that support them. It is designed to seamlessly replace popular terminal-link. In addition, it sanitizes the url to remove control characters.

Reason

sindresorhus/terminal-link#18 - terminal-link unfortunately adds a %E2%80%8B (Zero Width Space (ZWSP) character in Unicode, code point U+200B) to the start and end of the link in unsupported terminals, which makes links lead to 404 at least on Windows.

Installation

npm install termi-link

Usage

import { terminalLink } from 'termi-link';

terminalLink('example.com', 'https://example.com');
terminalLink('example.com', 'https://example.com', { fallback: (_text, url) => `${url}` });

Credits

License

MIT

About

This library provides clickable terminal links for terminals that support them. It is designed to seamlessly replace popular terminal-link

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published