Allow drag-drop on title bar to run that file in Terminal #8084

Open
opened 2026-01-31 01:20:23 +00:00 by claunia · 0 comments
Owner

Originally created by @ffes on GitHub (May 12, 2020).

Description of the new feature/enhancement

When I drop for instance a .bat file on the title bar that file should be run as a new tab in Terminal.

I often have a collection of .bat files to perform tasks while developing. When I double click those file they are started in conhost and thus opening a new window. This is not always what you want. If I was able to drop the file on the title bar of Terminal and it would run the script as a new tab in Terminal it could really help. For instance a command like docker run php:apache (within a .bat file with lots of options) can run for quite some time for a web developer.

Since the Windows Explorer knows how to open a .bat or .ps1 file, it can't be too hard for Terminal to do "the same".

It would be perfect if I can drag to the title bar, hover over the chevron, that menu is opened and I can drop on the entry I want. I have a regular cmd and a VS2019 Developer cmd profile. Or to allow dropping a .sh on different WSL distros.

Know that this requested feature does not interfere with the existing "drop and paste the filename" feature. This one is about dropping on the title bar and not on the terminal window itself.

For security reasons, you could limit it to a certain set of configurable default file extensions.

You want to be able to add extensions to a profile, so Terminal knows which profile to use for a certain file extension.

"droppedExtensions": [ "bat", "cmd" ]

When you drop on an existing tab it should still be opening a new tab, maybe of the same profile you dropped it on.

Originally created by @ffes on GitHub (May 12, 2020). # Description of the new feature/enhancement When I drop for instance a `.bat` file on the title bar that file should be run as a new tab in Terminal. I often have a collection of `.bat` files to perform tasks while developing. When I double click those file they are started in conhost and thus opening a new window. This is not always what you want. If I was able to drop the file on the title bar of Terminal and it would run the script as a new tab in Terminal it could really help. For instance a command like `docker run php:apache` (within a `.bat` file with lots of options) can run for quite some time for a web developer. Since the Windows Explorer knows how to open a `.bat` or `.ps1` file, it can't be too hard for Terminal to do "the same". It would be perfect if I can drag to the title bar, hover over the chevron, that menu is opened and I can drop on the entry I want. I have a regular `cmd` and a `VS2019 Developer cmd` profile. Or to allow dropping a `.sh` on different WSL distros. Know that this requested feature does not interfere with the existing "drop and paste the filename" feature. This one is about dropping on the title bar and not on the terminal window itself. For security reasons, you could limit it to a certain set of configurable default file extensions. You want to be able to add extensions to a profile, so Terminal knows which profile to use for a certain file extension. ```json "droppedExtensions": [ "bat", "cmd" ] ``` When you drop on an existing tab it should still be opening a new tab, maybe of the same profile you dropped it on.
claunia added the Issue-FeatureResolution-Duplicate labels 2026-01-31 01:20:23 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#8084