ZIm/crates/task
Dhruvin Gandhi ae076fa415
task: Add ZED_RELATIVE_DIR task variable (#31657)
This is my first contribution to zed, let me know if I missed anything.

There is no corresponding issue/discussion.

`$ZED_RELATIVE_DIR` can be used in cases where a task's command's
filesystem namespace (e.g. inside a container) is different than the
host, where absolute paths cannot work.

I modified `relative_path` to `relative_file` after the addition of
`relative_dir`.

For top-level files, where `relative_file.parent() == Some("")`, I use
`"."` for `$ZED_RELATIVE_DIR`, which is a valid relative path in both
*nix and windows.

Thank you for building zed, and open-sourcing it. I hope to contribute
more as I use it as my primary editor.

Release Notes:

- Added ZED_RELATIVE_DIR (path to current file's directory relative to
worktree root) task variable.
2025-05-29 11:50:36 +02:00
..
src task: Add ZED_RELATIVE_DIR task variable (#31657) 2025-05-29 11:50:36 +02:00
test_data VS Code -> Zed tasks converter (#9538) 2024-03-20 16:37:26 +01:00
Cargo.toml Implement basic support for VS Code debug configurations (#29160) 2025-04-22 14:24:09 +00:00
LICENSE-GPL Rename runnables into tasks (#8119) 2024-02-21 14:56:43 +02:00