imsnif / multitask

A mini-CI as a Zellij plugin
MIT License
73 stars 2 forks source link

Add command cwd to working directory #5

Closed leakec closed 9 months ago

leakec commented 9 months ago

Problem

I want to be able to run commands from a specific directory rather than the zellij /host directory. However, as we will see, the solution creates some other problems, namely:

Solution

leakec commented 9 months ago

We want to use something other than /host/.multitask. My first thought was something in /tmp, since this would also keep from cluttering up the /host folder. However, FileSystemUpdate, which is used to determine when the file is changed, only has access to the /host folder. Therefore, I think the best thing to do is create a unique .multitask file in the /host folder for each instance of the multitask plugin (there will be a unique instance for each one spawned with a different config). Luckily, we already have a unique identifier, which is the plugin ID. Therefore, I'll just append that to the name of the file, e.g., /host/.multitask1.