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

Feasability of adding args to set pty options? #62

Closed
ricecake opened this issue Feb 3, 2016 · 4 comments
Closed

Feasability of adding args to set pty options? #62

ricecake opened this issue Feb 3, 2016 · 4 comments

Comments

@ricecake
Copy link

ricecake commented Feb 3, 2016

I'm currently using this module to provide bash shell, and it works great.
The only problem that I've encountered so far is that the tty is sized at 80X24, which is moderately inconvenient for actually using the shell.

At the time when I'm actually exec'ing the subprocess, I know what terminal dimensions I would need, (as well as some other tty options, but those are gracefully handled by reset) so a mechanism to set tty options or at least dimensions would be very helpful.

@ricecake ricecake changed the title Feasability of adding agrs to set pty options? Feasability of adding args to set pty options? Feb 3, 2016
@saleyn
Copy link
Owner

saleyn commented Feb 3, 2016

Can you illustrate your use case by example? You are welcome to submit a patch.

@ricecake
Copy link
Author

ricecake commented Feb 3, 2016

Sure.

The interface that I'd like to see for the functionality would be something along the lines of changing the 'use a pty' flag from pty to pty | {pty, [pty_options()], where pty_options() includes {rows, int()} and {cols, int()}, and potentially other tty settings. Those setting would then be applied to the pty after it was created in the getpty function.

I'd be happy to try to submit a patch, and have been looking at the code for the port process to try and figure out the best way to do it. Unfortunately, I'm not incredibly well versed with the C side of erlang, nor the process itself, so there'll be a bit more of a learning curve to implementing it.

@saleyn
Copy link
Owner

saleyn commented Feb 3, 2016

That's a reasonable approach. What command do you pass to exec for interactive shell spawning? I'd like to see what it looks like with my configuration defaults.

The command parsing code is here

@saleyn
Copy link
Owner

saleyn commented Aug 31, 2016

Closed on no activity.

@saleyn saleyn closed this as completed Aug 31, 2016
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