Skip to content

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

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

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

Conversation

@leno23

@leno23 leno23 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 sharkdp#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