Skip to content
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

brackets inside file paths in the terminal breakes the follow link feature #98498

Closed
hacknlove opened this issue May 25, 2020 · 5 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug *out-of-scope Posted issue is not in scope of VS Code terminal Integrated terminal issues

Comments

@hacknlove
Copy link

hacknlove commented May 25, 2020

Issue Type: Bug

Open the terminal, run whatever command that shows a valid path to an existing file, that has brackets anywhere in the path like /foo/bar/[buz]

Try to follow the link with ctrl+click

The file should be opened, visual code tries to open just until the first bracket /foo/bar/ and it errors Unable to open 'bar': File is a directory.

VS Code version: Code 1.45.1 (5763d90, 2020-05-14T08:27:22.494Z)
OS version: Linux x64 5.3.0-53-generic

@Tyriar
Copy link
Member

Tyriar commented May 26, 2020

This sort of thing is difficult to support, we need to have a careful trade off of how many times we hit the disk and how complex the regex that is run on a line each time to cover the majority of cases.

@Tyriar Tyriar added this to the Backlog Candidates milestone May 26, 2020
@rzhao271 rzhao271 added *out-of-scope Posted issue is not in scope of VS Code bug Issue identified by VS Code Team member as probable bug labels Nov 4, 2020
@benmccann
Copy link
Contributor

benmccann commented Apr 20, 2021

Since this runs in the terminal it should run a very limited number of times since you can only display so many file paths at once. As a result, I would imagine the performance concerns should be limited and addressable. The real issue here in the past was around \\ which caused too much back tracking. I sent #121758 to fix the code comment about this

@zakkor
Copy link

zakkor commented Aug 4, 2021

Any chance we could make the list of characters accepted within a path a configurable option?

This way people who want ][ in their path names can do so (even if that might mean worse performance)

@Tyriar
Copy link
Member

Tyriar commented Oct 21, 2021

@zakkor try setting:

"terminal.integrated.wordSeparators": " (){}',\"`─‘’"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug *out-of-scope Posted issue is not in scope of VS Code terminal Integrated terminal issues
Projects
None yet
Development

No branches or pull requests

6 participants
@benmccann @Tyriar @zakkor @rzhao271 @hacknlove and others