Skip to content

Commit c87c768

Browse files
authored
Merge pull request #486 from Yurii201811/codex/document-pty-exec-command
Document pseudo-TTY execCommand usage
2 parents 3a08c25 + f3f87d2 commit c87c768

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,20 @@ ssh.connect({
101101
})
102102
```
103103

104+
#### Pseudo-TTY commands
105+
106+
Some terminal programs, such as `screen` or `tmux`, require a pseudo-TTY. Pass
107+
`pty: true` through `execOptions` when running those commands:
108+
109+
```js
110+
const result = await ssh.execCommand('screen -r', {
111+
execOptions: { pty: true }
112+
})
113+
114+
console.log('STDOUT: ' + result.stdout)
115+
console.log('STDERR: ' + result.stderr)
116+
```
117+
104118
#### API
105119

106120
```ts

0 commit comments

Comments
 (0)