Microsoft/vscode

Parentheses `()` and square brackets `[]` in file names can break terminal links (eg. next.js dynamic file paths)

Open

#212.109 aberto em 6 de mai. de 2024

Ver no GitHub
 (6 comments) (3 reactions) (1 assignee)TypeScript (10.221 forks)batch import
bugconfirmedhelp wantedterminal-links

Métricas do repositório

Stars
 (74.848 stars)
Métricas de merge de PR
 (Mesclagem média 11h 43m) (1.000 fundiu PRs em 30d)

Description

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.89.0
  • OS Version: macOS Sonoma 14.4.1

This issue was supposedly fixed in #169774, but it still doesn't seem to be working for me. Maybe a regression?

When the terminals logs file names that include characters ()[] (Used by NextJS routing segments for example), it splits the file name into multiple parts and is not properly clickable to open that file.

Steps to Reproduce:

In the integrated terminal, run echo "./src/(hello)/[world]/file.tsx" and hover over the output while holding cmd to see the different file segments determined by VSCode. Should look something like:

./src/(hello)/[world]/file.tsx
------ ----- - ----- ---------

Guia do colaborador