Skip to content

fix(help): list while/until as supported in help output#242

Merged
AlexandreYang merged 2 commits into
mainfrom
alex/help-fix
May 11, 2026
Merged

fix(help): list while/until as supported in help output#242
AlexandreYang merged 2 commits into
mainfrom
alex/help-fix

Conversation

@AlexandreYang

Copy link
Copy Markdown
Member

Summary

  • The control-flow feature in help advertised while and until as unsupported, but the interpreter actually supports both (and SHELL_FEATURES.md already documents them as ✅).
  • Verified by running scripts like X=0; while [ "$X" != stop ]; do echo iter; X=stop; done against the built binary — they iterate normally and exit 0.
  • Moved both forms from the Unsupported list to the Supported list under control-flow, refreshed the feature one-liner (for/while/until/if/...; no case/select/functions.), and dropped while/until from the top-level unsupported summary.
  • Updated the pinned strings in builtins/tests/help/help_test.go and tests/scenarios/cmd/help/unrestricted.yaml so they assert the new wording.

All other commands and features listed in help were verified to be present (33 commands, 8 features) — this was the only mismatch.

Test plan

  • go test ./builtins/... ./tests/... (passes locally)
  • make fmt clean
  • rshell -c 'help control-flow' shows while/until under Supported
  • rshell -c 'help' summary no longer claims while/until is unsupported

The control-flow feature description and unsupported-summary advertised
while and until loops as unsupported, but the interpreter has supported
both for some time (and SHELL_FEATURES.md already documents them as
supported). Move them from Unsupported to Supported and update the
pinned strings in help_test.go and the unrestricted help scenario.
@AlexandreYang
AlexandreYang marked this pull request as ready for review May 8, 2026 08:27
@AlexandreYang

Copy link
Copy Markdown
Member Author

@codex review

@astuyve

astuyve commented May 11, 2026

Copy link
Copy Markdown
Collaborator

codex is gonna say it's good

For each Supported/Unsupported item in the four syntactic features
(variables, control-flow, pipes-redirections, quoting-expansion), run a
canonical one-line script through the interpreter and assert:

  - Supported items must NOT produce a "not supported" rejection.
  - Unsupported items MUST produce one AND exit non-zero.

The probe map is keyed by the exact item string from featureRegistry,
so adding or rewording an entry without supplying a probe fails the
test — forcing future contributors to keep help and implementation in
lockstep. Verified that the test fails on the pre-fix help text:
"missing probe for unsupported item 'while and until loops.'".
@AlexandreYang
AlexandreYang added this pull request to the merge queue May 11, 2026
Merged via the queue into main with commit c775983 May 11, 2026
39 checks passed
@AlexandreYang
AlexandreYang deleted the alex/help-fix branch May 11, 2026 13:09
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.

2 participants