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

doc: general improvements to tty.md #6931

Closed
wants to merge 1 commit into from

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented May 23, 2016

Checklist
  • documentation is changed or added
  • the commit message follows commit guidelines
Affected core subsystem(s)

doc (tty)

Description of change

General improvements to tty.md

@nodejs/documentation

@jasnell jasnell added doc Issues and PRs related to the documentations. tty Issues and PRs related to the tty subsystem. labels May 23, 2016
@@ -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.
Copy link
Contributor

@thefourtheye thefourtheye May 23, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

module

@jasnell
Copy link
Member Author

jasnell commented May 23, 2016

@thefourtheye ... nits addressed!

@jasnell
Copy link
Member Author

jasnell commented May 25, 2016

Ping @thefourtheye

@Fishrock123
Copy link
Contributor

Seems fine to me if it has any rough definition of a TTY. (Even just "A Terminal".)

@jasnell
Copy link
Member Author

jasnell commented May 25, 2016

added very quick edit equating TTY = text terminal

@jasnell
Copy link
Member Author

jasnell commented May 26, 2016

@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.
Copy link
Member

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.

@benjamingr
Copy link
Member

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:
Copy link
Contributor

@Fishrock123 Fishrock123 May 27, 2016

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.

@Fishrock123
Copy link
Contributor

LGTM with a nit

@jasnell
Copy link
Member Author

jasnell commented May 27, 2016

Tweaked a bit to address those nits. Landing.

jasnell added a commit that referenced this pull request May 27, 2016
PR-URL: #6931
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
@jasnell
Copy link
Member Author

jasnell commented May 27, 2016

Landed in 5d2c0ac

@jasnell jasnell closed this May 27, 2016
Fishrock123 pushed a commit to Fishrock123/node that referenced this pull request May 30, 2016
PR-URL: nodejs#6931
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
rvagg pushed a commit that referenced this pull request Jun 2, 2016
PR-URL: #6931
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. tty Issues and PRs related to the tty subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants