# terminal_view: Add support for opening the terminal in the current file directory \(\#47739\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/6d772579e10af0d99d52c193116113e8f1bf96d0)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 6d772579e10af0d99d52c193116113e8f1bf96d0

Requested commit: 6d772579e10af0d99d52c193116113e8f1bf96d0

Commit: 6d772579e10af0d99d52c193116113e8f1bf96d0

Tree: 5ae11a084e87ff359abcefdfee4f46332acfe9b7

Author: Ruben Fricke

Committer: GitHub

## Message

```
terminal_view: Add support for opening the terminal in the current file directory (#47739)

Closes #14863

Changes:
- Added `CurrentFileDirectory` variant to the `WorkingDirectory` enum.
- New terminals now open in the directory of the currently active file
when this option is set.
- Falls back to project directory, then first workspace directory if no
file is active.

Release Notes:

- Added `current_file_directory` option for terminal's
`working_directory` setting. Set `"working_directory":
current_file_directory"` to open new terminals in the directory of your
currently open file.

---

Still relatively new to Rust, so happy to receive any feedback! 😁
```

## Parents

- [782f91f32024d8d91a52cb3c008b125e03f1bad2](https://git.cafe/gitcafe/zed/commit/782f91f32024d8d91a52cb3c008b125e03f1bad2?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/6d772579e10af0d99d52c193116113e8f1bf96d0?format=markdown)
