From 83404d81b33cc25987241d9ab3b1682e359d66f4 Mon Sep 17 00:00:00 2001 From: Mark Date: Wed, 12 Jun 2019 12:52:15 +0000 Subject: [PATCH] Client: Support terminal modes in pty options --- README.md | 2 ++ lib/client.js | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cfbcae2c..75715f4a 100644 --- a/README.md +++ b/README.md @@ -1013,6 +1013,8 @@ This is a normal **streams2** Duplex Stream (used both by clients and servers), * **term** - < _string_ > - The value to use for $TERM. **Default:** `'vt100'` +* **modes** - < _object_ > - An object containing [Terminal Modes](#terminal-modes) as keys, with each value set to each mode argument. **Default:** `null` + `rows` and `cols` override `width` and `height` when `rows` and `cols` are non-zero. Pixel dimensions refer to the drawable area of the window. diff --git a/lib/client.js b/lib/client.js index 305d8cdd..1e56bc84 100644 --- a/lib/client.js +++ b/lib/client.js @@ -1289,6 +1289,7 @@ function reqPty(chan, opts, cb) { var width = 640; var height = 480; var term = 'vt100'; + var modes = null; if (typeof opts === 'function') cb = opts; @@ -1303,6 +1304,8 @@ function reqPty(chan, opts, cb) { height = opts.height; if (typeof opts.term === 'string') term = opts.term; + if (typeof opts.modes === 'object') + modes = opts.modes; } var wantReply = (typeof cb === 'function'); @@ -1329,7 +1332,7 @@ function reqPty(chan, opts, cb) { height, width, term, - null, + modes, wantReply); }