Syntax for incorporating variables in command argument
- Dominant language
- Rust
- Stars
- 3.4k
- Forks
- 126
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 7
Description
Goal is to enable injecting in the commands values coming from
- some user input (see #404)
- cargo, eg the MSRV to have a `cargo +1.77 check` task (see #407)
- variables defined in the bacon.toml file (may be overriden per task, prefs, etc.)
- bacon itself (eg the name of the last failing test)
- other...
I'm not settled on a syntax right now but it must support arguments.
Maybe something like
```TOML
[jobs.ex-ask]
vars.MSRV = "cargo::msrv"
command = [
"cargo",
"+${MSRV}",
"check",
"--all-targets",
]
```
```TOML
# A task dedicated to checking cargo can be compiled with the MSRV
[jobs.check-msrv]
vars.example_name = {
source = "user::input",
question = "Name of the example to run?"
}
command = ["cargo", "run", "--example", "${example_name}"]
```
Contributor guide
Research direction
Start by reading the examples in this issue and the related discussions in #404 and #407. Define a variable syntax that supports command arguments and the listed sources, including user input, Cargo values, bacon.toml variables, and bacon-provided values; the work is done when those cases have an agreed, testable design.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100