Replace environment variable parser with zed --printenv outputting JSON (#32637)

Closes: https://github.com/zed-industries/zed/issues/32445
Follow-up to: https://github.com/zed-industries/zed/pull/31799

Release Notes:

- Improved handling of environment variables

---------

Co-authored-by: Conrad Irwin <conrad@zed.dev>
This commit is contained in:
Peter Tripp 2025-06-13 11:49:15 -04:00 committed by GitHub
parent d280c95d91
commit 71dbe88459
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 77 additions and 371 deletions

View file

@ -12,6 +12,9 @@ struct Cli {
/// by having Zed act like netcat communicating over a Unix socket.
#[arg(long, hide = true)]
askpass: Option<String>,
/// Used for loading the environment from the project.
#[arg(long, hide = true)]
printenv: bool,
}
#[derive(Subcommand)]
@ -55,6 +58,11 @@ fn main() {
return;
}
if cli.printenv {
util::shell_env::print_env();
return;
}
let result = match cli.command {
Some(Commands::Run {
log_file,