[PR #3547] Enable wt to inherit the working directory #25424

Open
opened 2026-01-31 09:09:25 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/3547

State: closed
Merged: No


Summary of the Pull Request

Enable wt to inherit the working directory from the commandline and Explorer.

References

PR Checklist

Detailed Description of the Pull Request / Additional comments

I don't feel totally confident in this change. This changes two scenarios, and the run dialog one I'm not super happy about:

  1. Explorer address bar: wtd -> Results in the Terminal being launched in the current path of explorer.
  2. From a commandline shell: wtd -> Results in the Terminal being launched in the current path of shell.
  3. Windows Search: Win, Term (or anything to get to "Windows Terminal)" -> Results in the Terminal being launched in startingDirectory
  4. Run Dialog: Win+R, wtd -> Results in the Terminal being launched in %USERPROFILE%
  • this is the CWD of the run dialog
  • maybe unexpected?
  1. Windows Search: Win, wtd -> Results in the Terminal being launched in C:\Windows\System32
  • technically, the Start menu is invoking the wtd commandline here.
  • maybe unexpected?
**Original Pull Request:** https://github.com/microsoft/terminal/pull/3547 **State:** closed **Merged:** No --- ## Summary of the Pull Request Enable `wt` to inherit the working directory from the commandline and Explorer. ## References ## PR Checklist * [x] Closes #878 * [x] I work here * [n/a?] Tests added/passed * [n/a] Requires documentation to be updated ## Detailed Description of the Pull Request / Additional comments I don't feel totally confident in this change. This changes two scenarios, and the run dialog one I'm not super happy about: 1. Explorer address bar: `wtd` -> Results in the Terminal being launched in the current path of explorer. 2. From a commandline shell: `wtd` -> Results in the Terminal being launched in the current path of shell. 3. Windows Search: <kbd>Win</kbd>, `Term` (or anything to get to "Windows Terminal)" -> Results in the Terminal being launched in `startingDirectory` 4. Run Dialog: <kbd>Win+R</kbd>, `wtd` -> Results in the Terminal being launched in %USERPROFILE% - this is the CWD of the run dialog - **maybe unexpected?** 5. Windows Search: <kbd>Win</kbd>, `wtd` -> Results in the Terminal being launched in `C:\Windows\System32` - _technically_, the Start menu is invoking the `wtd` commandline here. - **maybe unexpected?**
claunia added the pull-request label 2026-01-31 09:09:25 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#25424