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.
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