Repository navigation
feat: Enable || && and ; to function properly inside the shell - #45
Merged
Merged
Conversation
- They behave like sh: && and || bind equally from left to right, and ls /nope || echo fallback shows the error and then fallback. - Each command expands variables and globs when its turn comes, so export X=1; echo $X prints 1 and cd logs && ls * lists the new directory. - The whole line is checked before anything runs, so a syntax error late in the line changes nothing. vi can't be used inside a list. - Lists also work in scripts. A failure handled by || is shown with its script line and the script carries on. - Exit status was needed to make this correct. grep with no match now fails silently, so grep -q ERROR log && echo alert works. I added grep -q, true and false; the last two don't count toward the Command Collector achievement. A plain grep with no match on its own line behaves exactly as before. - When a list's last command fails, the mission is still checked, because earlier commands may already have changed things. sort f > f empties the file, as on Linux. One deliberate difference: if the command fails, the file is put back. An existing safety test requires that a rejected command never destroys data, and AGENTS.md says not to weaken that, so I kept it. Ranks: I added Staff SRE (1,600 XP), Principal SRE (2,150) and Distinguished Engineer (2,700) above Senior SRE. The existing thresholds didn't change, so nobody gets demoted. Your own profile at 1,201 XP stays Senior SRE and is 399 XP from the next rank. A new test checks that finishing Linux reaches Staff SRE and the full catalog reaches the top rank. Smaller fixes: - ls: named files are listed first, as typed. Directories come after with headers, -a shows . and .., and a hidden file you name explicitly is shown. - Globs: * no longer matches hidden files, though .* does. find still matches them, as on Linux. - cut: field lists like -f1,3, 2- and -2 work. Lines without the delimiter pass through whole, -s is new, and multi-character delimiters are rejected. - find: repeated tests now all have to match. -o and ! give a clear "not supported" error.
Aleksandergreg
pushed a commit
that referenced
this pull request
Oct 10, 2026
🤖 I have created a release *beep* *boop* --- ## [0.11.0](v0.10.0...v0.11.0) (2026-10-10) ### Features * Enable || && and ; to function properly inside the shell ([#45](#45)) ([ce2e4a7](ce2e4a7)) --- 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.
sort f > f empties the file, as on Linux. One deliberate difference: if the command fails, the file is put back. An existing safety test requires that a rejected command never destroys data, and AGENTS.md says not to weaken that, so I kept it.
Ranks: I added Staff SRE (1,600 XP), Principal SRE (2,150) and Distinguished Engineer (2,700) above Senior SRE. The existing thresholds didn't change, so nobody gets demoted. Your own profile at 1,201 XP stays Senior SRE and is 399 XP from the next rank. A new test checks that finishing Linux reaches Staff SRE and the full catalog reaches the top rank.
Smaller fixes: