feat(help): show version, command counts, and allowed/not-allowed builtins#181
Open
julesmcrt wants to merge 1 commit intojules.macret/Q/release-workflowfrom
Open
Conversation
4 tasks
…ltins
The help builtin now displays:
- A header with the rshell version and builtin count summary
("All N builtins available" or "N of M builtins enabled")
- A compact "Not allowed:" list when commands are restricted
- With --all, full description tables for both allowed and
not-allowed builtins
- When all builtins are allowed and --all is used, a confirmation
message "All builtins are allowed in this session."
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
4ee0b74 to
cdc07cf
Compare
matt-dz
approved these changes
Apr 14, 2026
| if len(notAllowed) > 0 { | ||
| if *allFlag { | ||
| // --all: full description table for not-allowed commands. | ||
| callCtx.Out("\nNot allowed:\n") |
Collaborator
There was a problem hiding this comment.
nit: i think "Disabled" is a better choice of word
| printCommandTable(callCtx, notAllowed) | ||
| } else { | ||
| // Default: compact comma-separated list. | ||
| callCtx.Outf("\nNot allowed: %s\n", wrapNames(notAllowed, 80)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
helpbuiltin now shows a header with the rshell version and builtin counthelpshows a compact "Not allowed:" list andhelp --allshows both sections as full description tables--allis used, shows "All builtins are allowed in this session."Before / After
1.
./rshell --allowed-commands "rshell:echo,rshell:help,rshell:ls" -c 'help'Only 3 builtins are allowed. Running
helpwithout--all.Before:
After:
2.
./rshell --allowed-commands "rshell:echo,rshell:help,rshell:ls" -c 'help --all'Only 3 builtins are allowed. Running
help --allto see full descriptions for not-allowed builtins too.Before:
After:
3.
./rshell --allow-all-commands -c 'help'All builtins are allowed. Running
helpwithout--all.Before:
After:
4.
./rshell --allow-all-commands -c 'help --all'All builtins are allowed. Running
help --all.Before:
After:
Test plan
--allflag, restricted "Not allowed:" outputgo test ./...— 43 packages, 0 failures)internal/version.Versionadded to allowlists)🤖 Generated with Claude Code