pkg / term

Package term manages POSIX terminals.
BSD 2-Clause "Simplified" License
393 stars 64 forks source link

Available() does not work on macos #33

Open nicks opened 6 years ago

nicks commented 6 years ago

Available() delegates to TIocinq, which is stubbed out as a no-op. https://github.com/pkg/term/blob/master/termios/termios_bsd.go#L81

Has anyone done evaluated what it would take to get it to work?

Seems like you might at least be able to do a select() call on the descriptor, to check if there's any data in the buffer (returning 1 or 0 would at least be marginally better than returning 0 all the time)