When using -d, make the parent process working dir also that directory #19553

Open
opened 2026-01-31 06:47:04 +00:00 by claunia · 0 comments
Owner

Originally created by @fireattack on GitHub (Mar 19, 2023).

Originally assigned to: @zadjii-msft on GitHub.

Description of the new feature/enhancement

I have "Starting directory" option set to "Use parent process directory" for defaults and all the profiles.

Currently, if I run wt -w -1 -d D:\ in Win+R, it will start a new window/tab that starting at D:\. However, in that window, if I create any new tab, it starts at C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.16.10261.0_x64__8wekyb3d8bbwe> instead of expected D:.

Proposed technical implementation details (optional)

I think it makes sense if you're creating a new process of wt, it should use -d argument as its working dir if exists. This way, when creating new tab (with "Use parent process directory" set), it would also use that dir instead of a meaningless directory where wt.exe sits in.

Originally created by @fireattack on GitHub (Mar 19, 2023). Originally assigned to: @zadjii-msft on GitHub. <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement I have "Starting directory" option set to "Use parent process directory" for defaults and all the profiles. Currently, if I run `wt -w -1 -d D:\` in Win+R, it will start a new window/tab that starting at `D:\`. However, in that window, if I create any new tab, it starts at `C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.16.10261.0_x64__8wekyb3d8bbwe>` instead of expected D:\. # Proposed technical implementation details (optional) I think it makes sense if you're creating a new process of `wt`, it should use `-d` argument as its working dir if exists. This way, when creating new tab (with "Use parent process directory" set), it would also use that dir instead of a meaningless directory where `wt.exe` sits in.
claunia added the Issue-FeatureResolution-Duplicate labels 2026-01-31 06:47:05 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19553