Open AarnavSin opened 3 months ago
We support Task Variables in task definitions.
Would ${ZED_DIRNAME}
in cwd
meet your needs?
ZED_DIRNAME
: absolute path of the currently opened file with file name stripped (e.g. /Users/my-user/path/to/project/src)
Check for existing issues
Describe the feature
Currently, Zed Tasks only have a way to reference one set directory via cwd. However, in some use cases, having the ability to pull the current open directory in your Zed window for that particular task could be helpful. For example, I was writing a task to allow me to easily create and open a file inside the terminal using the following code:
However, by default this file gets created in the project root directory and not the subfolder which is currently open. To my knowledge there's no way to tell it to create the file in the open subfolder. Even adding lines in the shell script to use pwd to at least pull the current terminal directory doesn't work correctly.
If applicable, add mockups / screenshots to help present your vision of the feature
No response