task
task copied to clipboard
Add new flag 'shell' which outputs shell commands from a task
The PR adds new flag --shell to the task command which works similar to dry run flag. It outputs raw shell command corresponding to the task without executing it.
Commit 22310215 also adds the same functionality to the pre-condition checks.
This PR addresses #701 Linting of commands
For the purposes of passing to another linter, such as shellcheck, would this need to do some preprocessing of template variables?
It might be interesting to combine this with #2114 as a trace implementation. For instance:
task default --tracer=audit
where the "audit" prints resolved task variables, envars (send to sh) and the sh commands.