while splitting page or opening new tab it does not respect "%__CD__%" #20000

Closed
opened 2026-01-31 07:00:09 +00:00 by claunia · 2 comments
Owner

Originally created by @sanket-bhalerao on GitHub (May 29, 2023).

Windows Terminal version

1.18.1421.0

Windows build number

10

Other Software

No response

Steps to reproduce

  • install windows terminal preview
  • edit setting to set "startingDirectory": "%__CD__%",
  • open windows terminal using context menu in any folder
  • split pane or open a new tab, the PWD resets to system32

Expected Behavior

in the 1.17 version any new tab opened after using context menu has the same path whn you open a split pane or new tab.
expecting same behavior from 1.18

Actual Behavior

when using split pane or new tab the pwd should be same as the parent window.

Originally created by @sanket-bhalerao on GitHub (May 29, 2023). ### Windows Terminal version 1.18.1421.0 ### Windows build number 10 ### Other Software _No response_ ### Steps to reproduce * install windows terminal preview * edit setting to set `"startingDirectory": "%__CD__%",` * open windows terminal using context menu in any folder * split pane or open a new tab, the PWD resets to system32 ### Expected Behavior in the 1.17 version any new tab opened after using context menu has the same path whn you open a split pane or new tab. expecting same behavior from 1.18 ### Actual Behavior when using split pane or new tab the pwd should be same as the parent window.
Author
Owner

@zadjii-msft commented on GitHub (May 29, 2023):

Try setting it to .. There were some pretty major changes in this area in 1.18, and I'll be the first to say I didn't test %__CD__%.

(but also: Tutorial: Opening a tab or pane in the same directory in Windows Terminal covers a more reliable way to make this work)

@zadjii-msft commented on GitHub (May 29, 2023): Try setting it to `.`. There were some pretty major changes in this area in 1.18, and I'll be the first to say I didn't test `%__CD__%`. (but also: [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) covers a more reliable way to make this work)
Author
Owner

@sanket-bhalerao commented on GitHub (Jun 17, 2023):

the . worked.
closing the ticket.

@sanket-bhalerao commented on GitHub (Jun 17, 2023): the `.` worked. closing the ticket.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#20000