Merge JANSI into JLine
gnodet opened this issue · 2 comments
I'm really considering merging Jansi into JLine to ease the maintenance of both projects.
Proposed PR in jline/jline3#871
As mentioned in the 2.4.1
release notes, dropping a note here because we are using the following:
var sz = new CLibrary.WinSize();
CLibrary.ioctl(fd, CLibrary.TIOCGWINSZ, sz);
var tty = CLibrary.ttyname(fd);
It would be great if there is an official way to get the tty name, width and height. We need those to do some fancy output stuff (line breaking, spinners, scrolling) and to check if stdin
, stdout
and stderr
are the same terminal or not to avoid some of our fancy things going haywire.
Thanks.
As mentioned in the
2.4.1
release notes, dropping a note here because we are using the following:var sz = new CLibrary.WinSize(); CLibrary.ioctl(fd, CLibrary.TIOCGWINSZ, sz); var tty = CLibrary.ttyname(fd);
It would be great if there is an official way to get the tty name, width and height. We need those to do some fancy output stuff (line breaking, spinners, scrolling) and to check if
stdin
,stdout
andstderr
are the same terminal or not to avoid some of our fancy things going haywire.Thanks.
Agreed. This has already been partially addressed with https://github.com/jline/jline3/blob/master/terminal/src/main/java/org/jline/terminal/spi/TerminalProvider.java. What's missing is the ability to access the TerminalProvider
without creating a terminal.