## Summary Fixes task variable resolution and Windows shell argument handling when `$ZED_WORKTREE_ROOT` contains spaces or when tasks are spawned while the global `tasks.json` buffer is focused. ## Problem `$ZED_WORKTREE_ROOT` could resolve from the active editor item even when that item was outside every visible project worktree, such as the global `tasks.json` file under the Zed config directory. On Windows, paths with spaces also need to remain one logical argument when terminal shell commands are constructed. ## Changes - Only let the active editor item provide the active task context when it belongs to a visible project worktree. - Fall back to the selected or first visible project worktree when the active editor item is external/global. - Preserve project-file-specific task variables for normal project buffers. - Add regression coverage for `$ZED_WORKTREE_ROOT` in `args` and `cwd` with synthetic Windows-style paths containing spaces. - Add regression coverage for PowerShell and cmd shell command construction so a spaced path remains quoted as one shell argument. ## Testing Ran on Windows with Rust 1.95.0, Visual Studio Build Tools 2022, and Windows SDK 10.0.26100.0: - `cargo fmt --all --check` - `cargo test -p util shell_builder::test::windows_powershell_preserves_spaced_arg_as_single_shell_argument -- --exact` - `cargo test -p util shell_builder::test::windows_cmd_preserves_spaced_arg_as_single_shell_argument -- --exact` - `cargo test -p task task_template::tests::test_worktree_root_with_spaces_stays_atomic_in_args_and_cwd -- --exact` - `cargo test -p tasks_ui tests::test_non_project_active_editor_uses_visible_worktree_context -- --exact` - `cargo test -p task` - `cargo test -p tasks_ui` - `cargo test -p workspace` Release Notes: - Fix Windows task path handling for worktree variables with spaces - [GPUI] N/A Co-authored-by: Chris Biscardi <chris@christopherbiscardi.com>
Zed
Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Installation
On macOS, Linux, and Windows you can download Zed directly or install Zed via your local package manager (macOS/Linux/Windows).
Other platforms are not yet available:
- Web (tracking discussion)
Developing Zed
Contributing
See CONTRIBUTING.md for ways you can contribute to Zed.
Also... we're hiring! Check out our jobs page for open roles.
Licensing
Zed source code is licensed primarily under GPL-3.0-or-later, with Apache-2.0 components where marked.
License information for third party dependencies must be correctly provided for CI to pass.
We use cargo-about to automatically comply with open source licenses. If CI is failing, check the following:
- Is it showing a
no license specifiederror for a crate you've created? If so, addpublish = falseunder[package]in your crate's Cargo.toml. - Is the error
failed to satisfy license requirementsfor a dependency? If so, first determine what license the project has and whether this system is sufficient to comply with this license's requirements. If you're unsure, ask a lawyer. Once you've verified that this system is acceptable add the license's SPDX identifier to theacceptedarray inscript/licenses/zed-licenses.toml. - Is
cargo-aboutunable to find the license for a dependency? If so, add a clarification field at the end ofscript/licenses/zed-licenses.toml, as specified in the cargo-about book.
Sponsorship
Zed is developed by Zed Industries, Inc., a for-profit company.
If you’d like to financially support the project, you can do so via GitHub Sponsors. Sponsorships go directly to Zed Industries and are used as general company revenue. There are no perks or entitlements associated with sponsorship.