Skip to content

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

Merged
Veykril merged 7 commits intozed-industries:mainfrom
RubenFricke:feat/terminal-current-file-directory
Feb 2, 2026
Merged

terminal_view: Add support for opening the terminal in the current file directory#47739
Veykril merged 7 commits intozed-industries:mainfrom
RubenFricke:feat/terminal-current-file-directory

Conversation

@RubenFricke
Copy link
Contributor

@RubenFricke RubenFricke commented Jan 27, 2026

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! 😁

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 27, 2026
@MrSubidubi MrSubidubi changed the title Feat/terminal current file directory Add support for opening the terminal in the current file directory Jan 27, 2026
Copy link
Member

@Veykril Veykril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Veykril Veykril changed the title Add support for opening the terminal in the current file directory terminal_view: Add support for opening the terminal in the current file directory Feb 2, 2026
@Veykril Veykril merged commit 6d77257 into zed-industries:main Feb 2, 2026
31 checks passed
adb-sh pushed a commit to adb-sh/zed that referenced this pull request Feb 5, 2026
…le directory (zed-industries#47739)

Closes zed-industries#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! 😁
@DaZhi-the-Revelator
Copy link
Contributor

yes, YES, YES!! Been waiting for this one for a long time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support current_file_directory forterminal.working_directory setting

3 participants