yash-rs
yash-rs copied to clipboard
Implementing POSIX.1-2024
trafficstars
This issue tracks the tasks involved in implementing the requirements for the shell as defined by The Open Group Base Specifications Issue 8.
- [x] #424
- [x] #425
- [x] #426
- [x]
;&in case command #430 - [x] #432
- [x] #533
- [x] #437 #438 #440
- [x] New
cdbuilt-in semantics- Update the exit status of
cdwhere the newPWDvalue cannot be determined (with and without-e) #447 - Reject an empty operand in the
cdbuilt-in c9d352145b3b4bf7cd620f59588fafb7c14b01da
- Update the exit status of
- [x] Update the exit status of
getoptson error 79aa9388d4f1a4c949d1a62fbd13b6504c407ad5 - [x] #449
trap(without options or operands) should show signals ignored by inheritance inexectrap -p(without operands) should show all signals
- [x] #459
- [x] New
readbuilt-in semantics (except byte-wise field splitting)- Add the
-doption to thereadbuilt-in #468 - The
readbuilt-in should treat quotes and escapes as specified in POSIX.1-2024 #467 - Return from the
readbuilt-in different exit statuses depending on the result #466
- Add the
- [ ] #477
- Report immediately on suspension of a foreground job
- Save the terminal state on suspension of a foreground job and restore when resuming
- Treat a job suspended when any of its component processes is suspended
- Treat successive synchronous and-or lists as a single foreground job
- Discard remaining part of the current list when a foreground process is suspended
- Allow job control without a controlling terminal
- Avoid allocating a controlling terminal if the shell does not already have one
- Use SIGTTIN to suspend the shell when starting job control in the background
- Reset the shell’s process group ID to match the process ID when starting job control
- [x] Accept
--separator in theexecbuilt-in 21b20aa701aeedcd79abd4f1d865fb16c2eae9e2 - [x] Reject if a redirection operand expands to more than one field in an interactive shell *
- Yash-rs does not expand redirection operands regardless of whether it is interactive
- [x] Abort the current line and continue the next when an interactive shell encounters a shell error that would exit a non-interactive shell
- [x] Exclude
.and..from pathname expansion results 5863fe2f104cdb249989886d8da3e9eaa0597036 - [x] Change
false,pwd, andtrueto substitutive built-ins 85f006e85e8a8b1480b4e57cf36c7c3552e810ca - [x] Enable the interactive mode if the shell is invoked with the
-soption and an operand with stdin and stderr connected to a terminal 69594a2eb34b05a8ea98894a520edb2472f5e65a - [x] #504
- [x] ~~Reject making LINENO, OLDPWD, OPTARG, OPTIND, and PWD readonly *~~
- [ ] Document POSIX non-conformance of brace expansion
- [x] Return exit status 128 on unrecoverable read error a54b44ce352ce4079e4a62e042cd4612aeb6f85d
- [x] Report the process (group) ID when an interactive shell starts a background job ba4150e9e7259cd6e82209f9a4593d37b1846ecf
- [x] #491
- [x] #503
- [x] #500
- [x] Keep the tilde expansion result with an empty HOME from empty field removal 93aa4b167b2da5dbd94d7e75f378ba8f45341358
- [x] ~~Reconsider the semantics of the
-hand-o nologoptions and update documentation~~ - [x] Reconsider when alias substitution should be performed in command substitutions of the form
$(...) - [x] ~~Import only variables that have a valid name from the environment~~
- [ ] Allow any non-null bytes (possibly not valid characters) in environment variable values
- [ ] Allow any non-null bytes (possibly not valid characters) in parameter values
- [ ] Change result types of expansions from character strings to bytes
- [ ] Reimplement field splitting in terms of bytes
- [ ] Revise field splitting in the
readbuilt-in to match the new field splitting semantics - [ ] Sort byte-by-byte if results of pathname expansion collate equal
- [ ] Set the exit status of suspended jobs to
$?only in interactive job-controlling shells
Items marked with an asterisk are behaviors that are newly allowed (but not required) by POSIX.1-2024.
The following are requirements that were not added in POSIX.1-2024, but have existed since earlier versions of POSIX.
- [x] (Fixed in 7ac4921c27dc71b557fb4a3ba6b58875ace6fc52) https://github.com/magicant/yash-rs/blob/69594a2eb34b05a8ea98894a520edb2472f5e65a/yash-cli/tests/scripted_test/quote-p.sh#L529-L530