feat: type/which/declare/ln builtins, errexit, nounset fix, sort -z, cut -z#233
Merged
feat: type/which/declare/ln builtins, errexit, nounset fix, sort -z, cut -z#233
Conversation
…cut -z
- Add type builtin with -t, -a, -p flags for command type inspection
- Add which builtin for command location
- Add hash builtin (no-op in sandboxed environment)
- Add declare/typeset builtin with -i, -r, -x, -a, -p flags
- Add ln builtin for symbolic link creation (-s, -f)
- Fix ! pipeline negation in parser (was never parsed)
- Fix set -e (errexit) at top-level script execution
- Fix ${var:-default} under set -u (nounset) to not error
- Add nounset awareness to all parameter expansion operators
- Add sort -z (zero-terminated input/output)
- Add cut -z (zero-terminated input/output)
- Add tr \0 escape sequence support
- 30 new spec tests, 4 previously-skipped tests now passing
- Update 009-implementation-status.md (90 core + 3 gated = 93 builtins)
https://claude.ai/code/session_012rzB3FRw7yoQWCG1mxyW7J
type/which/hash/ln tests that differ from real bash due to sandboxed environment (no PATH, no process table, VFS-only symlinks).
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
type(with -t/-a/-p/-f/-P),which,hash(no-op),declare/typeset(with -p/-r/-x/-a/-i),ln(with -s/-f)!pipeline negation parsing (was never parsed)${var:-default}and similar expansions no longer trigger unbound variable error\0escape in tr'sexpand_char_setTest plan
cargo test --all-featurespassescargo clippy --all-targets --all-features -- -D warningsclean