Merge nucleic/nimble-umber-toad-20h7 into dev

This commit is contained in:
2026-08-11 20:11:26 -07:00
parent 959a80f5ec
commit 8e934d8996
16 changed files with 196 additions and 196 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ impl builtins::Command for DotCommand {
context: brush_core::ExecutionContext<'_, SE>,
) -> Result<brush_core::ExecutionResult, Self::Error> {
// TODO(dot): Handle trap inheritance.
// nash: POSIX requires `.` to search PATH when its operand has no slash.
// hydrashell: POSIX requires `.` to search PATH when its operand has no slash.
// Git's `git-subtree` relies on this with `. git-sh-setup`; treating the
// operand as cwd-relative leaves `require_work_tree` undefined.
let script_path = Path::new(&self.script_path);
+6 -6
View File
@@ -298,16 +298,16 @@ struct InputReader {
deadline: Option<Instant>,
/// Single-byte read buffer.
///
/// nash(D2): multi-byte UTF-8 sequences are buffered and decoded incrementally in
/// hydrashell(D2): multi-byte UTF-8 sequences are buffered and decoded incrementally in
/// `read_event` (up to 4 bytes via `std::str::from_utf8`); invalid sequences degrade
/// to per-byte Latin-1 chars (the pre-fix behavior for every byte). bash's `-n`
/// counts bytes, which is preserved because the char-limit check measures
/// `line.len()` — the accumulated String's UTF-8 byte length.
buffer: [u8; 1],
/// nash(D2): a byte consumed while expecting a UTF-8 continuation that turned out to
/// hydrashell(D2): a byte consumed while expecting a UTF-8 continuation that turned out to
/// start the next character; re-consumed before the stream is read again.
pushback: Option<u8>,
/// nash(D2): decoded-but-undelivered chars from an invalid sequence flushed as
/// hydrashell(D2): decoded-but-undelivered chars from an invalid sequence flushed as
/// Latin-1; drained before the stream is read again.
pending: VecDeque<char>,
/// Terminal mode guard - kept alive for RAII cleanup on drop.
@@ -356,7 +356,7 @@ impl InputReader {
brush_core::sys::poll::poll_for_input(&self.input, Duration::ZERO).unwrap_or(false)
}
/// nash(D2): reads one byte, honoring the pushback slot and the read deadline.
/// hydrashell(D2): reads one byte, honoring the pushback slot and the read deadline.
/// Returns `Ok(None)` on EOF; timeout is reported via `TimedOut` in errors' stead by
/// the caller checking the deadline, so this only polls when a deadline exists.
fn read_byte(&mut self) -> Result<Option<u8>, brush_core::Error> {
@@ -372,10 +372,10 @@ impl InputReader {
/// Reads the next input event, handling timeout and control characters.
///
/// nash(D2): decodes UTF-8 incrementally instead of casting each byte to `char`
/// hydrashell(D2): decodes UTF-8 incrementally instead of casting each byte to `char`
/// (which was a Latin-1 decode and re-encoded input bytes — divergence D2 in
/// shell/corpus/DIVERGENCES.md, found when ca-certificates' postinst mangled a
/// UTF-8 filename under narOS). Valid multi-byte sequences round-trip
/// UTF-8 filename under hydrangeaOS). Valid multi-byte sequences round-trip
/// byte-identically through the accumulated String; invalid sequences degrade to
/// the pre-fix per-byte Latin-1 mapping (a String cannot hold raw invalid bytes —
/// full byte-fidelity for invalid UTF-8 would need Vec<u8> plumbing shell-wide).