Repository navigation
feat: $ and diagram update - #47
Merged
Merged
Conversation
$?
- It uses real Linux exit codes, not just 0 and 1:
| Status | When |
|--------|-----------------------------------------------------------------------------------|
| 0 | success |
| 1 | most failures, including grep with no match and false |
| 2 | shell syntax errors, and errors from ls, grep or sort |
| 126 | a script that exists but can't run (directory, not executable, missing #!/bin/sh) |
| 127 | an unknown command or missing script |
- It works with $?, ${?} and inside double quotes. Single-quoted or escaped $? stays literal.
- A command skipped by && or || keeps the previous status, and a blank or comment line doesn't reset it.
- It carries over between lines, so ls /nope followed by echo $? prints 2.
- Each script starts at 0, and a script's final status becomes the caller's $?.
- In the built game, ls /nope then echo $? printed 2, and an unknown command reported 127.
- Other special parameters ($1, $$, $#) are still rejected.
- The in-game help and the player and safety docs list the codes, and new tests cover each status plus scripts and persistence.
Diagram
- I updated the Mermaid source and confirmed it renders with Mermaid CLI 11, downloaded with npx into the scratchpad only.
- I didn't replace the published SVG with that raw render. All three repo diagrams are hand-made illustrations in a custom style, so I edited the SVG directly to match:
- a "Split lists" gate before Lex
- Lex now runs once per pipeline and mentions $?
- the redirect box notes that > empties the file first and restores it on failure
- a loop back for the next pipeline, labelled with the ; / && / ||
rules
Aleksandergreg
pushed a commit
that referenced
this pull request
Oct 10, 2026
🤖 I have created a release *beep* *boop* --- ## [0.12.0](v0.11.0...v0.12.0) (2026-10-10) ### Features * $ and diagram update ([#47](#47)) ([bd43343](bd43343)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
$?
Diagram