Skip to content

feat: allow --shell on a per-command basis#895

Closed
wyf027 wants to merge 1 commit into
sharkdp:masterfrom
wyf027:feat/per-command-shell-850
Closed

feat: allow --shell on a per-command basis#895
wyf027 wants to merge 1 commit into
sharkdp:masterfrom
wyf027:feat/per-command-shell-850

Conversation

@wyf027

@wyf027 wyf027 commented May 26, 2026

Copy link
Copy Markdown

Summary

  • Allow --shell/-S to be specified once for all commands or once per benchmark command (including reference), matching the pattern used by --prepare and --output.
  • Each benchmark now uses its own executor and shell calibration when needed.

Fixes #850

Example

hyperfine \
  -n zsh -S zsh '[[ -n $ZSH_VERSION ]] && echo something in zsh' \
  -n bash -S bash '[[ -n $BASH_VERSION ]] && echo something in bash' \
  -n "no shell" -S none 'echo no shell'

Test plan

  • cargo fmt
  • cargo test (unit + integration)
  • Added integration tests for per-command shell behavior and validation of shell count

Made with Cursor

Support specifying --shell/-S once for all benchmarks or once per command,
matching the existing pattern used by --prepare and --output. Each benchmark
now gets its own executor and shell calibration when needed.

Fixes #850

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

[Feature Request]: Allow passing --shell on a per-command basis

1 participant