Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge JANSI into JLine #277

Open
gnodet opened this issue Oct 12, 2023 · 2 comments
Open

Merge JANSI into JLine #277

gnodet opened this issue Oct 12, 2023 · 2 comments
Milestone

Comments

@gnodet
Copy link
Member

gnodet commented Oct 12, 2023

I'm really considering merging Jansi into JLine to ease the maintenance of both projects.

Proposed PR in jline/jline3#871

@xtaixe
Copy link

xtaixe commented Oct 16, 2023

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.

@gnodet
Copy link
Member Author

gnodet commented Oct 16, 2023

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.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants