microsoft / microsoft/terminal

Restarting a process loses pwd

Open
#16,501 2 comments 1 reaction 1 assignee View on GitHub

@zadjii-msft is already working on this.

Since Feb 8, 2024.

Area-TerminalControl Issue-Bug Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

### Windows Terminal version

1.18.3181.0

### Windows build number

10.0.22631.2861

### Other Software

_No response_

### Steps to reproduce

1. Set exit behaviour in Terminal to never close automatically by default

> ```json
> "profiles":
> {
> "defaults":
> {
> "closeOnExit": "never",
> ...
> ```

2. Launch a terminal app (a shell/cli editor) from the address bar in File Explorer
3. close it
4. press enter to restart

### Expected Behavior

The respawned process should have the same environment as the original process.

### Actual Behavior

The respawned process launches with the default launch directory of WT, `C:\WINDOWS\system32>`

https://github.com/microsoft/terminal/assets/70827815/3923ba36-08f6-4b8d-ba21-bd8ce1a5b227

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.