Skip to content

fix: rm terminalLink.isSupported checks #765

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mmkal
Copy link
Collaborator

@mmkal mmkal commented Mar 31, 2025

They're not needed - the terminal-link package checks this internally and formats the URL using parentheses and zero-width spaces. As it is the logic is dropping the URL in terminals like VSCode's/Cursor's terminal.

image

Can't rely on terminal-link as-is, though, because of sindresorhus/terminal-link#18

I set the fallback to be ${text} ( ${url} ) (i.e. using regular spaces instead of zero-width, because many UIs include the trailing zero-width space which breaks the URL clickability/copyability - see the long list of references on that issue, from redwood, shopify cli, warp etc. etc.)

image

I'm not familiar with terminal-link and unilaterally changing zero-width space to regular space could be a significant UI change, so I figured it's safer to sacrifice aesthetics for functionality just in the case of np.

mmkal added 2 commits March 31, 2025 10:59
They're not needed - the terminal-link package checks this internally and formats the URL using parentheses and zero-width spaces. As it is the logic is dropping the URL in terminals like VSCode's/Cursor's.
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

Successfully merging this pull request may close these issues.

1 participant