Opening Terminal inside Windows Explorer as a pane (or vice-versa) #7730

Open
opened 2026-01-31 01:11:23 +00:00 by claunia · 10 comments
Owner

Originally created by @moattarwork on GitHub (Apr 27, 2020).

Description of the new feature/enhancement

All the CMD terminals can be initiate from windows explorer which creates two windows to work with. In some development environments such as VSCode etc, you can combine the terminal to your IDE which is very helpful.

It would be very helpful if we can open the terminal in Windows Explorer so we can have access visually to the files and through the terminal. Also, they can be synced when we change the folder to the other location.

Originally created by @moattarwork on GitHub (Apr 27, 2020). # Description of the new feature/enhancement All the CMD terminals can be initiate from windows explorer which creates two windows to work with. In some development environments such as VSCode etc, you can combine the terminal to your IDE which is very helpful. It would be very helpful if we can open the terminal in Windows Explorer so we can have access visually to the files and through the terminal. Also, they can be synced when we change the folder to the other location.
claunia added the Issue-FeatureProduct-TerminalArea-Extensibility labels 2026-01-31 01:11:23 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Apr 27, 2020):

So this is a neat idea, though something that would be largely really hard to implement.

Say we were able to put a Terminal instance within explorer.exe. When the user navigates files in explorer, I'm not sure there's any good way for something like explorer to be able to change the working directory of cmd or powershell. Further, what would happen if there was something that wasn't a shell running in the Terminal instance? What if you were running the python REPL? What if you were running some sort of webserver, or msbuild? What if you ran ssh user@some-other-server in the Terminal? What would changing the directory in explorer.exe do then?

I think largely it would be really hard for changing the directory in explorer to have an effect on the Terminal that would be embedded in it. It would probably be at best capable of starting in the current directory that explorer was in.

It's also hard for the Terminal to report which directory it is in, and when the directory changes, for much of the same reason. I'd refer to #3158 for more details on this topic.

That being said, I think it would be a cool extension once #3158 landed for the Terminal to be able to display the CWD contents. For that reason alone, I'm linking this to #4000

@zadjii-msft commented on GitHub (Apr 27, 2020): So this is a neat idea, though something that would be largely really hard to implement. Say we were able to put a Terminal instance within `explorer.exe`. When the user navigates files in explorer, I'm not sure there's any good way for something like `explorer` to be able to change the working directory of `cmd` or `powershell`. Further, what would happen if there was something that _wasn't_ a shell running in the Terminal instance? What if you were running the `python` REPL? What if you were running some sort of webserver, or msbuild? What if you ran `ssh user@some-other-server` in the Terminal? What would changing the directory in `explorer.exe` do then? I think largely it would be really hard for changing the directory in explorer to have an effect on the Terminal that would be embedded in it. It would probably be at best capable of starting in the current directory that explorer was in. It's also hard for the Terminal to report which directory it is in, and when the directory changes, for much of the same reason. I'd refer to #3158 for more details on this topic. That being said, I think it would be a cool extension once #3158 landed for the Terminal to be able to display the CWD contents. For that reason alone, I'm linking this to #4000
Author
Owner

@aminya commented on GitHub (Jul 24, 2020):

I wish there was a collapsable pane on the sides of the terminal that showed an explorer, and I could navigate through the files and folders using it and tell the terminal to cd here, etc.

image

@aminya commented on GitHub (Jul 24, 2020): I wish there was a collapsable pane on the sides of the terminal that showed an explorer, and I could navigate through the files and folders using it and tell the terminal to `cd here`, etc. ![image](https://user-images.githubusercontent.com/16418197/88365988-6510d800-cd4d-11ea-93f6-9b19d668190b.png)
Author
Owner

@just1a-person commented on GitHub (Dec 11, 2020):

Idea: Preview Pane Handler?

@just1a-person commented on GitHub (Dec 11, 2020): Idea: Preview Pane Handler?
Author
Owner

@josalhor commented on GitHub (Dec 11, 2020):

Hello, I come from microsoft/PowerToys#2555 .

I will try to provide a summary of that issue:
Dolphin handles this feature with the following behaviour:

  • If the console is executing python REPL / ssh then changing folders doesn't change the state of the console
  • If not, on changing folder the explorer issues a Ctrl+C (^C) to the explorer to clear it from any written text by the user then inputs a change directory command (i.e " cd /home/josalhor/Desktop") and an Enter to execute.

You can see an example of what that looks like here. This allows developers to quickly see which files they have available at the current folder much faster than if they were to manually parse that information from a console. It also helps while exploring an unknown directory structure or with file visualization (like with images or markdown). Ideally it would be integrated with WSL and would allow for better interaction with the Linux Subsystem.

@josalhor commented on GitHub (Dec 11, 2020): Hello, I come from microsoft/PowerToys#2555 . I will try to provide a summary of that issue: Dolphin handles this feature with the following behaviour: - If the console is executing python REPL / ssh then changing folders doesn't change the state of the console - If not, on changing folder the explorer issues a Ctrl+C (^C) to the explorer to clear it from any written text by the user then inputs a change directory command (i.e " cd /home/josalhor/Desktop") and an Enter to execute. You can see an example of what that looks like [here](https://askubuntu.com/questions/336920/how-to-open-terminal-in-dolphin). This allows developers to quickly see which files they have available at the current folder much faster than if they were to manually parse that information from a console. It also helps while exploring an unknown directory structure or with file visualization (like with images or markdown). Ideally it would be integrated with WSL and would allow for better interaction with the Linux Subsystem.
Author
Owner

@zadjii-msft commented on GitHub (Nov 8, 2022):

idle thought: I wonder if it'd be possible to have a (hypothetical) Terminal extension "drive" an explorer window. Like, have it pop up a little window picker, and then any time the pane's CWD gets set via shell integration, the extension goes and manually changes that explorer window's path.

@zadjii-msft commented on GitHub (Nov 8, 2022): idle thought: I wonder if it'd be possible to have a (hypothetical) Terminal extension "drive" an explorer window. Like, have it pop up a little window picker, and then any time the pane's CWD gets set via shell integration, the extension goes and manually changes that explorer window's path.
Author
Owner

@zadjii-msft commented on GitHub (Mar 9, 2023):

A crazy idea from Teams

I wonder if there's an alternate future where do do the "window parenting" thing (as an actual feature), much like gvim --windowid does (wt --experimental.windowid 0xf00)
that one, window parenting, offers some interesting opportunities. you could even drag INTO a window hosted inside another window
which would be pretty neat. dock terminal inside explorer, yeah? imagine
somebody COULD write a shell extension to put a terminal inside explorer that way

@zadjii-msft commented on GitHub (Mar 9, 2023): A crazy idea from Teams > I wonder if there's an alternate future where _do_ do the "window parenting" thing (as an actual feature), much like `gvim --windowid` does (`wt --experimental.windowid 0xf00`) > that one, window parenting, offers some interesting opportunities. you could even drag INTO a window hosted inside another window > which would be pretty neat. dock terminal inside explorer, yeah? imagine > somebody COULD write a shell extension to put a terminal inside explorer that way
Author
Owner

@alensiljak commented on GitHub (Oct 19, 2023):

I would appreciate with a "start small" approach and have an option of adding a Terminal tab in Windows Explorer. And, when I say tab, I mean just another tab - which seems to be a new feature in Explorer anyway.

image

There are tabs also in the terminal window and it can run various shells.

image

So, why not simply provide the possibility to open the current folder as a new tab in Windows Explorer? No sync to anything. Just another tab, hosting a shell (default Terminal?), starting from the location where we chose an action to open it.
All the other details can be worked-out (if needed!) at a later stage.

Edit: I think this is actually already happening. Dragging a tab from the Terminal window to the Explorer window does indeed make a space for the new tab. However, the drop operation is not handled yet. But it seems to be moving in that direction.

@alensiljak commented on GitHub (Oct 19, 2023): I would appreciate with a "start small" approach and have an option of adding a Terminal tab in Windows Explorer. And, when I say tab, I mean just another tab - which seems to be a new feature in Explorer anyway. ![image](https://github.com/microsoft/terminal/assets/462445/52507c8b-826f-43ac-938e-b5433de99553) There are tabs also in the terminal window and it can run various shells. ![image](https://github.com/microsoft/terminal/assets/462445/4385563c-b477-44ab-8e05-611ec7cfbfd6) So, why not simply provide the possibility to open the current folder as a new tab in Windows Explorer? No sync to anything. Just another tab, hosting a shell (default Terminal?), starting from the location where we chose an action to open it. All the other details can be worked-out (if needed!) at a later stage. Edit: I think this is actually already happening. Dragging a tab from the Terminal window to the Explorer window does indeed make a space for the new tab. However, the drop operation is not handled yet. But it seems to be moving in that direction.
Author
Owner

@zadjii-msft commented on GitHub (Oct 19, 2023):

Edit: I think this is actually already happening. Dragging a tab from the Terminal window to the Explorer window does indeed make a space for the new tab. However, the drop operation is not handled yet. But it seems to be moving in that direction

To be very clear: this is not happening any time soon. The only reason that happens is that the two different TabViews in Terminal and Explorer both by default act like they can accept drag/drops from any other tabbed application, when they really can't. Even dragging a terminal tab over VsCode will change the feedback to "Move↗", as if vscode could accept the drag (it can't). This is one of the (many) bugs we've got to sort out on the WinUI side.

@zadjii-msft commented on GitHub (Oct 19, 2023): > Edit: I think this is actually already happening. Dragging a tab from the Terminal window to the Explorer window does indeed make a space for the new tab. However, the drop operation is not handled yet. But it seems to be moving in that direction To be very clear: this is not happening any time soon. The only reason that happens is that the two different `TabView`s in Terminal and Explorer both by default act like they can accept drag/drops from any other tabbed application, when they really can't. Even dragging a terminal tab over VsCode will change the feedback to "Move↗", as if vscode could accept the drag (it can't). This is one of the (many) bugs we've got to sort out on the WinUI side.
Author
Owner

@aereaco commented on GitHub (Dec 11, 2023):

Something similar to this would be awesome

dolphin-terminal

@aereaco commented on GitHub (Dec 11, 2023): Something similar to this would be awesome ![dolphin-terminal](https://github.com/microsoft/terminal/assets/5489600/5f78a172-cd18-40be-9d1b-16fd3c03744b)
Author
Owner

@klaribot commented on GitHub (Mar 11, 2024):

This would be an incredibly useful addition to the Explorer if it had a terminal pane just like KDE's dolphin file browser, where changing folders/directories within Explorer would keep the current working directory of the attached terminal in sync.

And it would be even more incredible of a feature if what @zadjii-msft commented on was actually possible.

I know they mean that this is a bug, not a feature, and needs to be addressed, but it would be really cool if it were addressed in a way to make that bug work as the accidental feature instead of patching it out, y'know? One can dream, I suppose.

@klaribot commented on GitHub (Mar 11, 2024): This would be an incredibly useful addition to the Explorer if it had a terminal pane just like KDE's `dolphin` file browser, where changing folders/directories within Explorer would keep the current working directory of the attached terminal in sync. And it would be even more incredible of a feature if what @zadjii-msft commented on was actually possible. I know they mean that this is a bug, not a feature, and needs to be addressed, but it would be really cool if it were addressed in a way to make that bug work as the accidental feature instead of patching it out, y'know? One can dream, I suppose.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#7730