Drag folder/file to '+' button to open new tab in directory #13779

Closed
opened 2026-01-31 03:51:54 +00:00 by claunia · 4 comments
Owner

Originally created by @TomByrne on GitHub (May 11, 2021).

Description of the new feature/enhancement

Would be nice if dragging and dropping a folder from explorer onto the plus button created a new shell within that directory.
If a file is dropped, then the parent folder should be used.

As a bonus it would be nice if dragging onto an existing tab set the CWD of that shell to the directory, but I believe this would require more configuration per shell-type (i.e. would need to know how to navigate to the folder, and in the case of unix-like shells how to transform the path).

Note: Currently dragging a file/folder into an existing shell (i.e. not the tab) pastes the path into that shell; I'm not suggesting that this change at all (although if the path-transformation issue mentioned above is solved then maybe it could be re-used here, as windows-format paths are fairly useless in a unix-like shell).

Originally created by @TomByrne on GitHub (May 11, 2021). # Description of the new feature/enhancement Would be nice if dragging and dropping a folder from explorer onto the plus button created a new shell within that directory. If a file is dropped, then the parent folder should be used. As a bonus it would be nice if dragging onto an existing tab set the CWD of that shell to the directory, but I believe this would require more configuration per shell-type (i.e. would need to know how to navigate to the folder, and in the case of unix-like shells how to transform the path). Note: Currently dragging a file/folder into an existing shell (i.e. not the tab) pastes the path into that shell; I'm not suggesting that this change at all (although if the path-transformation issue mentioned above is solved then maybe it could be re-used here, as windows-format paths are fairly useless in a unix-like shell).
Author
Owner

@zadjii-msft commented on GitHub (May 11, 2021):

This is a neat idea, thanks!

As a bonus it would be nice if dragging onto an existing tab set the CWD of that shell to the directory, but I believe this would require more configuration per shell-type (i.e. would need to know how to navigate to the folder, and in the case of unix-like shells how to transform the path).

Yea, you've pretty much laid out why that wouldn't work. What if you dragged a file into vim? You'd almost expect vim to open up the file, but there's no real way to tell vim "Hey the user drag-dropped {this path} onto the terminal"

We have a totally other issue on the repro tracking "drag drop for WSL should use WSL paths", but I'm too lazy to link that right now 😛

@zadjii-msft commented on GitHub (May 11, 2021): This is a neat idea, thanks! > As a bonus it would be nice if dragging onto an existing tab set the CWD of that shell to the directory, but I believe this would require more configuration per shell-type (i.e. would need to know how to navigate to the folder, and in the case of unix-like shells how to transform the path). Yea, you've pretty much laid out why that wouldn't work. What if you dragged a file into `vim`? You'd almost expect vim to open up the file, but there's no real way to tell `vim` "Hey the user drag-dropped {this path} onto the terminal" We have a totally other issue on the repro tracking "drag drop for WSL should use WSL paths", but I'm too lazy to link that right now 😛
Author
Owner

@skyline75489 commented on GitHub (May 18, 2021):

Here, #1772. I think this is what you looking for 😄

@skyline75489 commented on GitHub (May 18, 2021): Here, #1772. I think this is what you looking for 😄
Author
Owner

@ghost commented on GitHub (Aug 31, 2021):

:tada:This issue was addressed in #10160, which has now been successfully released as Windows Terminal Preview v1.11.2421.0.🎉

Handy links:

@ghost commented on GitHub (Aug 31, 2021): :tada:This issue was addressed in #10160, which has now been successfully released as `Windows Terminal Preview v1.11.2421.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.11.2421.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Author
Owner

@ghost commented on GitHub (Aug 31, 2021):

🎉Windows Terminal Preview v1.11.2421.0 has been released which incorporates this pull request.🎉

Handy links:

@ghost commented on GitHub (Aug 31, 2021): :tada:`Windows Terminal Preview v1.11.2421.0` has been released which incorporates this pull request.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.11.2421.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#13779