Skip to content

feat: accept direct command arguments after separator - #949

Open
Huzaifa-Asif wants to merge 4 commits into
sharkdp:masterfrom
Huzaifa-Asif:feat/direct-command-arguments
Open

Huzaifa-Asif wants to merge 4 commits into
sharkdp:masterfrom
Huzaifa-Asif:feat/direct-command-arguments

Conversation

@Huzaifa-Asif

@Huzaifa-Asif Huzaifa-Asif commented Oct 3, 2026 •

Copy link
Copy Markdown

Summary

  • treat the executable and arguments after -- as one benchmark command
  • preserve argument boundaries by passing the captured argv directly to std::process::Command
  • keep the existing positional syntax unchanged for benchmarking multiple shell command strings
  • document that the new form runs without an intermediate shell

Unlike the closed, unmerged #880, this does not join arguments into a command expression for execution. shell_words::join is used only to produce the human-readable benchmark name; the executed argv remains structured.

The branch now includes upstream master at e4a3213; the conflict resolution preserves the new metrics and default-shell CLI behavior while retaining direct-argument parameter detection. The regression test was adapted to the upstream removal of --time-unit without weakening its quoted-argument-boundary assertion.

Verification

  • cargo fmt -- --check — passed on exact head 398f6a8
  • cargo clippy --locked --all-targets -- -D warnings — passed with Rust 1.99.0
  • cargo test --locked — 124 tests passed with Rust 1.99.0 (52 unit, 18 execution-order, 54 integration)
  • focused regression verifies placeholders used in the executable and arguments are not reported as unused
  • prior-head CI passed with the repository MSRV; current-head CI remains authoritative for platform and MSRV coverage
  • git diff --check — passed

Fixes #802

AI assistance disclosure

OpenAI Codex assisted with command-path research, implementation, regression tests, conflict resolution, verification, and drafting this description.

@Huzaifa-Asif
Huzaifa-Asif marked this pull request as ready for review October 4, 2026 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow -- to signal end of argument parsing

1 participant