microsoft / microsoft/terminal

`globalSummon` a new tab in explorer CWD

Open
#10,202 2 comments 5 reactions 0 assignees View on GitHub
Area-Settings Issue-Feature Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

Hey,
little question. The quake mode is really nice, but is there a way to automatically open the terminal/quake mode on current focused explorer folder.

For example I have focused an Explorer window in my Downloads directory and then press ctrl+alt+t (my shortcut for quake mode) it should automatically open the console in this directory.

Thanks

_Originally posted by @meydominic in https://github.com/microsoft/terminal/issues/8888#issuecomment-848470679_


I'm not sure that is possible, sorry 😕 When pressing the global hotkey, we don't get any context about the active window.......

ah shoot. okay. So, maybe we could:
* get the foreground window,
* check if it's an `explorer.exe` window,
* then use the hack we're already using for the background context menu to get the path of that window.

That might work. We'd still need a setting for "when this `globalSummon` action is performed, open a new tab with the explorer CWD." That of course leads to "I want to `globalSummon` in explorer and get a new pane" or "I want to `globalSummon` in explorer and new a new pane and have that pane running {profile}"

This deserves it's own thread

---

### Summary

A keyboard shortcut to open terminal app in the same path as file explorer window.

Lot of devs who use VS code or similar editors/IDEs are familiar with the shortcut `ctrl + `` to open terminal in the project's path.
Though windows have a right click shortcut for it, the keyboard shortcut is just muscle memory.

_from @MG-LSJ in #17192_

Contributor guide

Open the contributing guide

Research direction

Start by tracing the existing globalSummon action and the background context-menu handling used to obtain an Explorer path. Determine how the foreground Explorer window and its current directory can be identified, then define the setting behavior for opening a tab or pane. Done means the global shortcut opens the terminal in the focused Explorer window's directory.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.