docs(tasks): clarify shebang argument behavior - #11336
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe changes document task argument forwarding across execution styles, add a Bash shebang example, and verify multiple-argument handling—including spaces—with an end-to-end test. ChangesShebang task arguments
Estimated code review effort: 1 (Trivial) | ~5 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryClarifies how extra task arguments are forwarded and adds E2E coverage for preserving argument boundaries in TOML shebang tasks.
Confidence Score: 5/5The PR appears safe to merge with no actionable defects identified. The documentation matches the task runner’s shebang argument behavior, and the added E2E fixture correctly verifies separate positional arguments while preserving spaces. Important Files Changed
Reviews (1): Last reviewed commit: "docs(tasks): clarify shebang argument be..." | Re-trigger Greptile |
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.7.14 x -- echo |
18.4 ± 0.9 | 16.5 | 21.2 | 1.00 |
mise x -- echo |
19.8 ± 1.6 | 17.5 | 45.7 | 1.08 ± 0.10 |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.7.14 env |
17.1 ± 0.9 | 15.5 | 21.9 | 1.00 |
mise env |
18.2 ± 0.8 | 16.4 | 22.9 | 1.07 ± 0.07 |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.7.14 hook-env |
17.8 ± 0.9 | 16.3 | 22.1 | 1.00 |
mise hook-env |
19.1 ± 1.0 | 17.4 | 23.2 | 1.08 ± 0.08 |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.7.14 ls |
15.4 ± 0.8 | 14.2 | 20.8 | 1.00 |
mise ls |
16.5 ± 0.8 | 15.0 | 19.8 | 1.07 ± 0.08 |
xtasks/test/perf
| Command | mise-2026.7.14 | mise | Variance |
|---|---|---|---|
| install (cached) | 153ms | 161ms | -4% |
| ls (cached) | 57ms | 59ms | -3% |
| bin-paths (cached) | 59ms | 62ms | -4% |
| task-ls (cached) | 121ms | 127ms | -4% |
Summary
usagedefinitions for precise, validated task interfacesrunarrays, inline shell commands, and shebang scripts$1and$@Motivation
Discussion #11334 highlighted that “arguments are passed to the last command” could be read as the last line of a multiline script. In the implementation, it refers to the last entry of a
runarray. Shebang bodies are executed as script files, so forwarded arguments are exposed through the interpreter's normal argv mechanism.This documents the existing behavior while steering tasks that need a precise argument contract toward the
usagefield.Validation
mise run test:e2e tasks/test_task_shellmise run lint-fixNote
Low Risk
Documentation and e2e test only; no production code paths changed.
Overview
Documents how extra task arguments are forwarded when there is no
usagespec, replacing the single “last command only” line with three cases: last entry of arunarray, append for inline shell, and normal script argv ($1/$@) for shebang tasks.Shebang section in TOML tasks gains a short explanation plus a
greetexample showingmise run greet world.E2E adds
bashshebangargsto assert forwarded args reach$@with spaces preserved.Reviewed by Cursor Bugbot for commit 6ca734e. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
Documentation
usagedefinition is provided.usagefield.Tests