zed/crates/cli
Bennet Bo Fenner df33d78661
Some checks are pending
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
deploy_nightly_docs / deploy_docs (push) Waiting to run
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / miri_scheduler (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / build_visual_tests_binary (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
cli: Always open new window when cli_default_open_behavior=new_window (#59415)
This makes sure that the behaviour of the CLI matches that of the UI.
In Zed itself we always open a new window (e.g. when clicking on Open
Project in new window in the recent projects picker), but in the CLI we
where re-using existing windows even when specifying
"cli_default_open_behavior": "new_window".
This caused confusion, so this PR ensures that we always open a new
window, even if that folder is already open. We still focus the active
window in the case where the path is a subpath of a project that is
already open.

Can be tested with

```
cd crates/cli
cargo run -- --zed ../../target/debug/zed somefolder
```

Release Notes:

- cli: Ensure `zed somefolder` always opens a new window, even when
`cli_default_open_behavior` is set to `new_window` and the project is
already open
2026-06-30 20:10:06 +00:00
..
src cli: Always open new window when cli_default_open_behavior=new_window (#59415) 2026-06-30 20:10:06 +00:00
build.rs Fix Windows icon resource for bin zed.exe (#54738) 2026-05-01 22:33:54 +00:00
Cargo.toml Add shell completions for CLI (#57440) 2026-06-22 14:57:34 +00:00
LICENSE-GPL
README.md remote: Support line and column numbers for remote paths (#40410) 2025-10-17 10:50:22 +00:00

Cli

Testing

You can test your changes to the cli crate by first building the main zed binary:

cargo build -p zed

And then building and running the cli crate with the following parameters:

 cargo run -p cli -- --zed ./target/debug/zed.exe