cli: be more flexible about width when printing --help#22637
Closed
addaleax wants to merge 2 commits intonodejs:masterfrom
Closed
cli: be more flexible about width when printing --help#22637addaleax wants to merge 2 commits intonodejs:masterfrom
--help#22637addaleax wants to merge 2 commits intonodejs:masterfrom
Conversation
targos
approved these changes
Sep 1, 2018
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; |
Member
There was a problem hiding this comment.
Nit: Math.floor is easier to understand than the bitwise operator
BridgeAR
approved these changes
Sep 1, 2018
Member
Author
Member
Author
|
Windows re-build: https://ci.nodejs.org/job/node-test-commit-windows-fanned/20480/ |
trivikr
approved these changes
Sep 4, 2018
jasnell
approved these changes
Sep 4, 2018
cjihrig
approved these changes
Sep 4, 2018
Contributor
|
Landed in 089c0d1. |
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>
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 was referenced Sep 6, 2018
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes (presumably)