Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open windows from a previous session does not restore the working directories of any tab #15975

Closed
abatishchev opened this issue Sep 16, 2023 · 2 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Issue-Question For questions or discussion Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Resolution-Answered Related to questions that have been answered Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@abatishchev
Copy link

Windows Terminal version

1.17.11461.0

Windows build number

10.0.19045.0

Other Software

PowerShell Core:

$PSVersionTable.PSVersion.ToString()
7.3.6

PS> Get-Module | select Name,Version

Name                         Version
----                         -------
Microsoft.PowerShell.Utility 7.0.0.0
PSReadLine                   2.2.6

PowerShell For Windows:

PS> $PSVersionTable.PSVersion.ToString()
5.1.19041.3031

PS> Get-Module | select Name,Version

Name                                      Version
----                                      -------
Microsoft.Azure.Deployment.Express.Client 1.0.0.0
Microsoft.PowerShell.Management           3.1.0.0
Microsoft.PowerShell.Security             3.0.0.0
Microsoft.PowerShell.Utility              3.1.0.0
Microsoft.WSMan.Management                3.0.0.0
PSReadline                                2.0.0

Steps to reproduce

  1. Configure Windows Terminal to "open windows from a previous session"
  2. Open various tabs, switch to different working directories
  3. Close Windows Terminal

Expected Behavior

Windows Terminal to restore the previous session with all tabs having opened their last working directory.

Actual Behavior

Windows Terminal restores the tabs and panes as expected, but does not switch into the correct directories, instead remains in the default configured ($env:USERPROFILE)

@abatishchev abatishchev added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Sep 16, 2023
@abatishchev
Copy link
Author

This issue is exactly like #14270 but I don't have Oh My Posh (or any other additional software I could think could cause this) installed.

@zadjii-msft
Copy link
Member

As mentioned in #14270:

Did you configure your shell to tell the Terminal what the CWD is/?

Refer to: Opening a tab or pane in the same directory in Windows Terminal.

See also microsoft/terminal/issues (restore directory)

You need to configure the shell to tell the Terminal about the CWD, for terminal to be able to restore them.

@zadjii-msft zadjii-msft closed this as not planned Won't fix, can't repro, duplicate, stale Sep 18, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Sep 18, 2023
@zadjii-msft zadjii-msft added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. Issue-Question For questions or discussion Resolution-Answered Related to questions that have been answered and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Issue-Question For questions or discussion Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Resolution-Answered Related to questions that have been answered Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

2 participants