Skip to content

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.
@sindresorhus
Copy link
Owner

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

That issue has been fixed.

@mmkal
Copy link
Collaborator Author

mmkal commented Nov 15, 2025

@sindresorhus correct me if I'm wrong, but it looks like the fix came in terminal link v5 which requires node 20. I don't want to add to the scope of this PR to make it a breaking change, so pushed a change to keep the explicitly-specified fallback, but made it mimic the v5 behaviour so it should be smooth to update terminal-link when that does happen.

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.

3 participants