Feature request: Enable setting Variables in a Recipe
- Dominant language
- Rust
- Stars
- 35.8k
- Forks
- 846
- Avg merge
- 27m
- Merged PRs (30d)
- 3
Description
There's already a great docs section that talks about [Setting Variables in a Recipe](https://github.com/casey/just#setting-variables-in-a-recipe).
This is a feature that I frequently miss, and sometimes I want to avoid the suggested solution of using a single shell for the recipe using the she-bang line. (Typically, this is when I want the exit-code behavior of just, as using a she-bang line changes that functionality.)
It seems like it could be achieved by mimicking a shell's `export` behavior; that is, if the recipe line starts with `export` then add the resulting variable to the just process environment.
Since each line is within a shell, any current shell line with `export NAME=variable` is effectively a no-op, so this feature only extends, but does not modify, existing functionality.
Contributor guide
Assessment
This issue has not been assessed yet.