FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

cli: be more flexible about width when printing `--help` by addaleax · Pull Request #22637 · nodejs/node · GitHub

/ node Public

cli: be more flexible about width when printing --help - #22637

Closed
addaleax wants to merge 2 commits into
nodejs:masterfrom
addaleax:help-width
Closed

cli: be more flexible about width when printing --help#22637
addaleax wants to merge 2 commits into
nodejs:masterfrom
addaleax:help-width

Conversation

Copy link
Copy Markdown
Member
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes (presumably)
  • commit message follows commit guidelines

Copy link
Copy Markdown
Collaborator

mohammed-adil-moughal left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

looks good

targos self-assigned this Sep 1, 2018
targos self-requested a review September 1, 2018 10:55
targos removed their assignment Sep 1, 2018

targos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I love it!

Comment thread lib/internal/print_help.js Outdated
// Use 75 % of the available width, and at least 70 characters.
const width = Math.max(70, (stream.columns * 0.75) | 0);
const firstColumn = (width * 0.4) | 0;
const secondColumn = (width * 0.57) | 0;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Nit: Math.floor is easier to understand than the bitwise operator

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@targos Thanks for pointing that out, done!

addaleax added the cli Issues and PRs related to the Node.js command line interface. label Sep 1, 2018

addaleax commented Sep 2, 2018

Copy link
Copy Markdown
Member Author

addaleax added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Sep 2, 2018

addaleax commented Sep 2, 2018

Copy link
Copy Markdown
Member Author

danbev commented Sep 5, 2018

Copy link
Copy Markdown
Contributor

Landed in 089c0d1.

danbev closed this Sep 5, 2018
danbev pushed a commit that referenced this pull request Sep 5, 2018
PR-URL: #22637
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
addaleax deleted the help-width branch September 5, 2018 09:26
targos pushed a commit that referenced this pull request Sep 5, 2018
PR-URL: #22637
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
targos pushed a commit that referenced this pull request Sep 6, 2018
PR-URL: #22637
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. cli Issues and PRs related to the Node.js command line interface.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants


Back | FazBrowse Home | New Git URL