"Use parent process directory" flag being ignored in some cases #19133

Closed
opened 2026-01-31 06:34:40 +00:00 by claunia · 2 comments
Owner

Originally created by @brupelo on GitHub (Dec 24, 2022).

Windows Terminal version

1.15.3465.0

Windows build number

Microsoft Windows [Version 10.0.19045.2364]

Other Software

No response

Steps to reproduce

1.- Go to settings and modify the "Command Prompt" profile and enable the checkbox "Use parent process directory" in the Starting directory section
2.- Make sure "Command Prompt" profile will be used when using new-tab, new-windows and split-pane commands
3.- Create a new window using wt --startingDirectory d:\ , the new terminal will open on that directory
4.- Spawn a new-tab action (+ sign or shortcut) and the new tab will be using --startingDirectory c:\users\my_user . It happens the same if i try to split-pane or new-window commands

Expected Behavior

What I'd like to achieve is, each time I'm on a certain directory of my tab, opening a new tab/pane/window using the same directory of the source tab

For instance, in conemu this works wonderfully, each time i split panes it will use the current directory of the source pane.

Actual Behavior

When you run a new-window/new-tab/split-pane command from a tab with current directory A it will be using directory B.

Is this expected? I don't understand, what does it mean "Use parent process directory" then? Is this a bug?

Originally created by @brupelo on GitHub (Dec 24, 2022). ### Windows Terminal version 1.15.3465.0 ### Windows build number Microsoft Windows [Version 10.0.19045.2364] ### Other Software _No response_ ### Steps to reproduce 1.- Go to settings and modify the "Command Prompt" profile and enable the checkbox "Use parent process directory" in the Starting directory section 2.- Make sure "Command Prompt" profile will be used when using new-tab, new-windows and split-pane commands 3.- Create a new window using `wt --startingDirectory d:\` , the new terminal will open on that directory 4.- Spawn a new-tab action (+ sign or shortcut) and the new tab will be using --startingDirectory `c:\users\my_user` . It happens the same if i try to split-pane or new-window commands ### Expected Behavior What I'd like to achieve is, each time I'm on a certain directory of my tab, opening a new tab/pane/window using the same directory of the source tab For instance, in conemu this works wonderfully, each time i split panes it will use the current directory of the source pane. ### Actual Behavior When you run a new-window/new-tab/split-pane command from a tab with current directory A it will be using directory B. Is this expected? I don't understand, what does it mean "Use parent process directory" then? Is this a bug?
claunia added the Needs-TriageIssue-Bug labels 2026-01-31 06:34:40 +00:00
Author
Owner

@j4james commented on GitHub (Dec 27, 2022):

what does it mean "Use parent process directory"

If you do something like type wt from within the Windows Explorer address bar, it will open Windows Terminal in whichever directory you're viewing in Explorer.

What I'd like to achieve is, each time I'm on a certain directory of my tab, opening a new tab/pane/window using the same directory of the source tab

For that to work, you need to configure your shell to tell the terminal which directory is active.

It's explained in this tutorial: Opening a tab or pane in the same directory in Windows Terminal.

@j4james commented on GitHub (Dec 27, 2022): > what does it mean "Use parent process directory" If you do something like type `wt` from within the Windows Explorer address bar, it will open Windows Terminal in whichever directory you're viewing in Explorer. > What I'd like to achieve is, each time I'm on a certain directory of my tab, opening a new tab/pane/window using the same directory of the source tab For that to work, you need to configure your shell to tell the terminal which directory is active. It's explained in this tutorial: [Opening a tab or pane in the same directory in Windows Terminal](https://learn.microsoft.com/en-us/windows/terminal/tutorials/new-tab-same-directory).
Author
Owner

@brupelo commented on GitHub (Dec 28, 2022):

@j4james Thank you very much! I wasn't aware of those docs and they really help, it was pretty straightforward to modify the corresponding actions to duplicate tabs or panes.

False bug report, closing now.

@brupelo commented on GitHub (Dec 28, 2022): @j4james Thank you very much! I wasn't aware of those docs and they really help, it was pretty straightforward to modify the corresponding actions to duplicate tabs or panes. False bug report, closing now.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19133