-
Notifications
You must be signed in to change notification settings - Fork 243
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
basic termios symbols support #53
Conversation
@Tyriar Do have an idea why with the last changes all the tests failed? I did not change anything in the C++ code but the native module is missing. Maybe related to the order of creation of the native and the TS module? |
@jerch |
@Tyriar The new interface has landed. Since I used some C++11 features Travis still has some issues with outdated compilers. |
@Tyriar I cant get travis working with OSX, it seems the compiler suite does not support |
Holy moly getting closer to the real issues - the different platform dependent termios symbols. Travis containers are really outdated or have outdated defaults, it took me like 6h of googling around to get this running on OSX. Not cool :( |
@Tyriar Puuh, ready. Feel free to change the TS interface to your needs. The basic interface to C++ land works as following:
Remarks:
|
Thanks @jerch, I'll try look at this sometime over the next week. |
@Tyriar Hmm thought about the termios thing - maybe it is better to put it into a separate module, that can be imported by |
@jerch that may be a good idea, why I'm deferring reviewing the PR is the sheer size of the change. There is also the fact that it doesn't apply on Windows (at least yet) which pushes further away from a unified API across Windows/Unix-like. Maybe separating it further and allowing consumers to pull it in only if they need it? I believe all it needs is the var pty = require('node-pty');
var termios = require('node-termios');
// init terminal using pty...
var attributes = termios.getAttributes(terminal.fd);
// ... |
@Tyriar Ok, gonna put it into a separate module. Don't know yet if I'll start from scratch or use https://github.com/Gottox/node-termios as a basis (it is missing some functions). Not sure either if windows compatibility to some degree can be achieved, most symbols are meaningless for console programs there. I think winpty does not emulate the higher level functions of unix's tty system (like line buffering with ICANON, separate setting of input/output/local/character modes etc.) Maybe @rprichard can tell. |
node-termios seems to do pretty much everything we wanted already, no? |
Almost - it doesnt handle the |
rough proof of concept - do not merge.
Implements a low level interface to the termios data. Can be used in a C-ish style with bitwise operators, see termios_test.js for an example. Needs a better interface...