-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
doc: general improvements to tty.md #6931
Conversation
@@ -2,13 +2,19 @@ | |||
|
|||
Stability: 2 - Stable | |||
|
|||
The `tty` module houses the `tty.ReadStream` and `tty.WriteStream` classes. In | |||
most cases, you will not need to use this module directly. | |||
The `tty` modules provides the `tty.ReadStream` and `tty.WriteStream` classes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
module
@thefourtheye ... nits addressed! |
Ping @thefourtheye |
Seems fine to me if it has any rough definition of a TTY. (Even just "A Terminal".) |
added very quick edit equating TTY = text terminal |
@nodejs/documentation ... can I please get a final review on this one! |
* `fd` {number} A numeric file descriptor | ||
|
||
The `tty.isatty()` method returns `true` if the given `fd` is associated with | ||
a TTY; `false` otherwise. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Writing true
if X; false otherwise.` always sort of irked me.
LGTM |
`tty.ReadStream` and both `process.stdout` and `process.stderr` will, by | ||
default be instances of `tty.WriteStream`. The preferred method of determining | ||
whether Node.js is being run within a TTY context is to check the boolean | ||
`process.stdout.isTTY` property: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: this won't be boolean if stdout isn't a TTY instance, instead it will be undefined
.
LGTM with a nit |
Tweaked a bit to address those nits. Landing. |
PR-URL: #6931 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]>
Landed in 5d2c0ac |
PR-URL: nodejs#6931 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]>
PR-URL: #6931 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]>
Checklist
Affected core subsystem(s)
doc (tty)
Description of change
General improvements to tty.md
@nodejs/documentation