cli-clear icon indicating copy to clipboard operation
cli-clear copied to clipboard

Check if current process is in TTY

Open pi0 opened this issue 7 years ago • 3 comments

This will ensure we are in a TTY (on none tty environments, getWindowSize is not available)

pi0 avatar Oct 07 '16 23:10 pi0

Why set to 3 when not a TTY? Also, there's window-size.

stevenvachon avatar Aug 11 '17 18:08 stevenvachon

Hey :)) Actually I don't remind as this is a pretty old PR :D But I think it was because of windows terminal compatibility which TTY is not available. Feel free closing if not appreciate. Ah, maybe it was because we don't know how many lines that terminal has without access to TTY so 3 just is a fallback to simulate a soft cls.

pi0 avatar Aug 11 '17 18:08 pi0

I wonder if it should do anything in a non-TTY on Windows.

stevenvachon avatar Aug 11 '17 20:08 stevenvachon