You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make file paths with spaces in the console work as clickable links #1995
When something is broken, and an error is thrown VSCode allows you to ctrl+click link to link to file. This is great, but it doesn't work with the path that has spaces in them.
I'm not sure this is something the extension controls. It is the VSCode terminal that turns paths into clickable links (not this extension). And the extension doesn't control the generation of that path and the fact that it isn't quoted. It is PowerShell that generates that error text.
Oops, had a comment written out but forgot to post and Keith Hill (@rkeithhill)'s since commented!
Przemysław Kłys (@PrzemyslawKlys) I'm not sure how we'd change this; these links appear because VSCode automatically turns paths into links (i.e. we don't do anything, it's a native VSCode feature).
The error message itself comes directly from PowerShell too.
If you get rid of the PowerShell extension and replicate the same error in the powershell or pwsh console, you'll see identical behaviour.
Without us intercepting and reformatting the error message in the integrated console (which I imagine might be unwanted by many users and would come at a performance and complexity cost), I'm not sure what we can do here
changed the title [-]Clicking on links in console doesn't work for filepaths with spaces[/-][+]Make file paths with spaces in the console work as clickable links[/+]on May 31, 2019
I figured it might not be something straight forward. If it can't be fixed I can close this issue. It's not a big deal, just something that would be useful in the long run. Maybe a fix to PS6/PS7 so that throwing errors would include path in quotes? Still, older versions of PS would have the problem, but at least new releases would work.
Maybe a fix to PS6/PS7 so that throwing errors would include path in quotes? Still, older versions of PS would have the problem, but at least new releases would work.
I was going to suggest maybe trying 8.3 naming convention... But... WindowsPowerShell is one of two directories in C:\Program Files that doesn't have 8.3 naming (the other being ModifiableWindowsApps) (also note Windows.old appears to be another one with no 8.3...)
Activity
rkeithhill commentedon May 31, 2019
I'm not sure this is something the extension controls. It is the VSCode terminal that turns paths into clickable links (not this extension). And the extension doesn't control the generation of that path and the fact that it isn't quoted. It is PowerShell that generates that error text.
rjmholt commentedon May 31, 2019
Oops, had a comment written out but forgot to post and Keith Hill (@rkeithhill)'s since commented!
Przemysław Kłys (@PrzemyslawKlys) I'm not sure how we'd change this; these links appear because VSCode automatically turns paths into links (i.e. we don't do anything, it's a native VSCode feature).
The error message itself comes directly from PowerShell too.
If you get rid of the PowerShell extension and replicate the same error in the
powershellorpwshconsole, you'll see identical behaviour.Without us intercepting and reformatting the error message in the integrated console (which I imagine might be unwanted by many users and would come at a performance and complexity cost), I'm not sure what we can do here
[-]Clicking on links in console doesn't work for filepaths with spaces[/-][+]Make file paths with spaces in the console work as clickable links[/+]PrzemyslawKlys commentedon May 31, 2019
I figured it might not be something straight forward. If it can't be fixed I can close this issue. It's not a big deal, just something that would be useful in the long run. Maybe a fix to PS6/PS7 so that throwing errors would include path in quotes? Still, older versions of PS would have the problem, but at least new releases would work.
rjmholt commentedon May 31, 2019
Good thinking!
rjmholt commentedon May 31, 2019
We should investigate how VSCode does this first -- it may be that quoting won't help
TylerLeonhardt commentedon Jun 2, 2019
Daniel Imms (@Tyriar) any thoughts here?
rkeithhill commentedon Jun 3, 2019
Quoting doesn't seem to work. :-(
rjmholt commentedon Jun 3, 2019
Yeah I had a play around with it and I suspect the link support starts after the quote, where the
C:\or the/occurscorbob commentedon Jun 3, 2019
I was going to suggest maybe trying 8.3 naming convention... But... WindowsPowerShell is one of two directories in
C:\Program Filesthat doesn't have 8.3 naming (the other beingModifiableWindowsApps) (also noteWindows.oldappears to be another one with no 8.3...)Bartheleway commentedon Oct 16, 2026
Any news on this issue?