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
[Terminal] Windows: drag and droping a tab from the workspace returns an invalid path #29926
bugIssue identified by VS Code Team member as probable bughelp wantedIssues identified as good community contribution opportunitiesterminalGeneral terminal issues that don't fall under another labelverifiedVerification succeededwindowsVS Code on Windows issues
Drag and drop a tab from the editor onto the integrated terminal
What happens?
A unix-like path is copied, like: /e:/docs/Dev/test.js. This path is invalid and cannot be used into the terminal without replacing the slashes with backslashes and removing the first slash.
What should happen?
This should copy a Windows path: e:\docs\Dev\test.js
changed the title [-][Terminal] Windows: drag and droping a tab from the workspace uses unix separators[/-][+][Terminal] Windows: drag and droping a tab from the workspace returns an invalid path[/+]on Jun 30, 2017
Question is, how do you know which environment you're running on?
I'm not sure this can be properly guessed. The terminal.integrated.shell.oscould be used but nothing stops the user from running bash even though integrated shell is set to cmd.exe on Windows for example.
Good point. I'm not sure either. The only way may be to analyze prompt strings / prefixes, unless there is a way to get the most nested process running in the shell.
In the meantime maybe it could be fixed so that it works in at least one environment (I would suggest cmd.exe), because right now, the path's that's returned (/e:/docs/Dev/test.js) isn't valid in any environment (cmd/bash).
It turns out there is a way to query child processes of the shell, and I created a PR (#30070) that does this. The querying does add some latency though, so keeping the path always Windows-formatted could be a better way to go.
Daniel Imms (@Tyriar) It's supposed to be fixed according to the VSCode 1.15 release notes but it still returns an invalid path on Windows 10 with cmd.exe: (Creators Update)
I just fixed this today (before I saw this issue). #32734 it was happening because we were getting the URI path, not the file path. rianadon's change to get different shells formatting the path differently is blocked on #31818 which is actively being worked on.
bugIssue identified by VS Code Team member as probable bughelp wantedIssues identified as good community contribution opportunitiesterminalGeneral terminal issues that don't fall under another labelverifiedVerification succeededwindowsVS Code on Windows issues
Activity
[-][Terminal] Windows: drag and droping a tab from the workspace uses unix separators[/-][+][Terminal] Windows: drag and droping a tab from the workspace returns an invalid path[/+]rianadon commentedon Jul 2, 2017
The path should also be compatible with other shells, such as bash under WSL or Git Bash.
This would require another setting though, unless it is assumed the executable names are never changed by people.
warpdesign commentedon Jul 2, 2017
Question is, how do you know which environment you're running on?
I'm not sure this can be properly guessed. The
terminal.integrated.shell.oscould be used but nothing stops the user from running bash even though integrated shell is set tocmd.exeon Windows for example.rianadon commentedon Jul 2, 2017
Good point. I'm not sure either. The only way may be to analyze prompt strings / prefixes, unless there is a way to get the most nested process running in the shell.
nico-onmap commentedon Jul 3, 2017
In the meantime maybe it could be fixed so that it works in at least one environment (I would suggest cmd.exe), because right now, the path's that's returned (
/e:/docs/Dev/test.js) isn't valid in any environment (cmd/bash).rianadon commentedon Jul 3, 2017
It turns out there is a way to query child processes of the shell, and I created a PR (#30070) that does this. The querying does add some latency though, so keeping the path always Windows-formatted could be a better way to go.
warpdesign commentedon Jul 3, 2017
Nice work rianadon!
I'd vote for simply formatting paths as Windows by default, and have an option to use your method.
Tyriar commentedon Jul 5, 2017
rianadon it looks like you've stumbled onto something I've been wanting for a while in
wmic.exe. I made a note in #20676 (comment) 🍻warpdesign commentedon Aug 10, 2017
Daniel Imms (@Tyriar) It's supposed to be fixed according to the VSCode 1.15 release notes but it still returns an invalid path on Windows 10 with cmd.exe: (Creators Update)
/c:/Users/warpd/Dev/athenajs-tetris/js/flash_lines.jsTyriar commentedon Aug 18, 2017
I just fixed this today (before I saw this issue). #32734 it was happening because we were getting the URI path, not the file path. rianadon's change to get different shells formatting the path differently is blocked on #31818 which is actively being worked on.
Tyriar commentedon Aug 18, 2017
I'll keep it open until other shell paths are handled correctly