Flattens a resolved command into the individual shell command lines it will
run: a single string yields one line, an array yields one line per element.
Used by --dry-run to preview exactly what would execute.
Expands a task’s command, resolving any @task references into the commands
of the referenced task (recursively), and returns a flattened command ready
to run. Reference cycles are detected and reported as errors.