readSliceShort not performing a short read when reading from stdin?

Hi,
I have a simple setup for a raw terminal buffer, lflag.ICANON = false; lflag.ECHO = false; ... and I’m trying to read as much as is available into a buffer with readSliceShort, but it seems like the function is trying to fill the buffer with multiple read calls. If I give it a buffer of [8]u8, I have to type 8 characters before the function returns.

Of course I could just use std.posix.read, but if possible I would rather use the std.Io.File.Reader implementation since it’s OS-agnostic. The other solution I can think of is to peek a single byte, then use the internal buffer to see if more was read, but this feels a bit hacky. Is there not something like this in the std library?

readSliceShort only reads less than the buffer if it reaches end of stream

As far as I know, fillMore is the only short read function in std.Io.Reader. Or you could use fileReadStreaming from the std.Io.vtable directly.

Yeah I don’t know why I didn’t think about just using the read functions, sorry about that lol. Thanks!