Open glucas opened 1 year ago
You can use the variable justl-justfile
to set a custom default directory: https://github.com/psibi/justl.el/blob/8821feee1a5e541af9cf1962877c817f07bbba21/justl.el#L98
That's different though -- that identifies which justfile to use, right?
I'm thinking of a case like this:
some-project/
justfile
module-1/
module-2/
There's only one justfile, but it defines [no-cd] recipes that are useful in both module-1 and module-2. Right now if I'm working in module-1 and open the justl buffer those recipes fail since they run from the root dir instead. (But opening a shell and running just from the module-1 dir works fine.)
I see what you mean.
One can use justl-exec-recipe-in-dir, but it would nice if there were a way to set the default directory for the justl buffer to drive recipes in a particular project directory.
I'm open to PR's for this for changing the default working directory from the opened justl buffer.
Executing commands from the
justl
buffer always runs in the justfile directory. This is not always desirable. For example,just
supports [no-cd] to run recipes from the working directory instead of the justfile directory. This can be useful when working with projects that have multiple submodules with a common set of commands.One can use
justl-exec-recipe-in-dir
, but it would nice if there were a way to set the default directory for thejustl
buffer to drive recipes in a particular project directory.