Skip to content

Commit 3d49d3b

Browse files
aashiljoshgav
authored andcommitted
src: fix the misalinged text on "node --help"
The alignment of the argument descriptions in the "node --help" text is off. This commit fixes the issue by adding two spaces before each of the argument description. PR-URL: nodejs#10948 Fixes: nodejs#10935 Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Josh Gavant <josh.gavant@outlook.com>
1 parent cab9ca6 commit 3d49d3b

File tree

1 file changed

+55
-52
lines changed

1 file changed

+55
-52
lines changed

src/node.cc

+55-52
Original file line numberDiff line numberDiff line change
@@ -3467,91 +3467,94 @@ void LoadEnvironment(Environment* env) {
34673467
static void PrintHelp() {
34683468
// XXX: If you add an option here, please also add it to doc/node.1 and
34693469
// doc/api/cli.md
3470-
printf("Usage: node [options] [ -e script | script.js ] [arguments] \n"
3471-
" node debug script.js [arguments] \n"
3470+
printf("Usage: node [options] [ -e script | script.js ] [arguments]\n"
3471+
" node debug script.js [arguments]\n"
34723472
"\n"
34733473
"Options:\n"
3474-
" -v, --version print Node.js version\n"
3475-
" -e, --eval script evaluate script\n"
3476-
" -p, --print evaluate script and print result\n"
3477-
" -c, --check syntax check script without executing\n"
3478-
" -i, --interactive always enter the REPL even if stdin\n"
3479-
" does not appear to be a terminal\n"
3480-
" -r, --require module to preload (option can be "
3474+
" -v, --version print Node.js version\n"
3475+
" -e, --eval script evaluate script\n"
3476+
" -p, --print evaluate script and print result\n"
3477+
" -c, --check syntax check script without executing\n"
3478+
" -i, --interactive always enter the REPL even if stdin\n"
3479+
" does not appear to be a terminal\n"
3480+
" -r, --require module to preload (option can be "
34813481
"repeated)\n"
34823482
#if HAVE_INSPECTOR
3483-
" --inspect[=host:port] activate inspector on host:port\n"
3484-
" (default: 127.0.0.1:9229)\n"
3483+
" --inspect[=host:port] activate inspector on host:port\n"
3484+
" (default: 127.0.0.1:9229)\n"
34853485
" --inspect-brk[=host:port] activate inspector on host:port\n"
34863486
" and break at start of user script\n"
34873487
#endif
3488-
" --no-deprecation silence deprecation warnings\n"
3489-
" --trace-deprecation show stack traces on deprecations\n"
3490-
" --throw-deprecation throw an exception on deprecations\n"
3491-
" --no-warnings silence all process warnings\n"
3492-
" --trace-warnings show stack traces on process warnings\n"
3493-
" --trace-sync-io show stack trace when use of sync IO\n"
3494-
" is detected after the first tick\n"
3495-
" --trace-events-enabled track trace events\n"
3496-
" --trace-event-categories comma separated list of trace event\n"
3497-
" categories to record\n"
3498-
" --track-heap-objects track heap object allocations for heap "
3488+
" --no-deprecation silence deprecation warnings\n"
3489+
" --trace-deprecation show stack traces on deprecations\n"
3490+
" --throw-deprecation throw an exception on deprecations\n"
3491+
" --no-warnings silence all process warnings\n"
3492+
" --trace-warnings show stack traces on process warnings\n"
3493+
" --trace-sync-io show stack trace when use of sync IO\n"
3494+
" is detected after the first tick\n"
3495+
" --trace-events-enabled track trace events\n"
3496+
" --trace-event-categories comma separated list of trace event\n"
3497+
" categories to record\n"
3498+
" --track-heap-objects track heap object allocations for heap "
34993499
"snapshots\n"
3500-
" --prof-process process v8 profiler output generated\n"
3501-
" using --prof\n"
3502-
" --zero-fill-buffers automatically zero-fill all newly allocated\n"
3503-
" Buffer and SlowBuffer instances\n"
3504-
" --v8-options print v8 command line options\n"
3505-
" --v8-pool-size=num set v8's thread pool size\n"
3500+
" --prof-process process v8 profiler output generated\n"
3501+
" using --prof\n"
3502+
" --zero-fill-buffers automatically zero-fill all newly "
3503+
"allocated\n"
3504+
" Buffer and SlowBuffer instances\n"
3505+
" --v8-options print v8 command line options\n"
3506+
" --v8-pool-size=num set v8's thread pool size\n"
35063507
#if HAVE_OPENSSL
3507-
" --tls-cipher-list=val use an alternative default TLS cipher list\n"
3508-
" --use-bundled-ca use bundled CA store"
3508+
" --tls-cipher-list=val use an alternative default TLS cipher "
3509+
"list\n"
3510+
" --use-bundled-ca use bundled CA store"
35093511
#if !defined(NODE_OPENSSL_CERT_STORE)
35103512
" (default)"
35113513
#endif
35123514
"\n"
3513-
" --use-openssl-ca use OpenSSL's default CA store"
3515+
" --use-openssl-ca use OpenSSL's default CA store"
35143516
#if defined(NODE_OPENSSL_CERT_STORE)
35153517
" (default)"
35163518
#endif
35173519
"\n"
35183520
#if NODE_FIPS_MODE
3519-
" --enable-fips enable FIPS crypto at startup\n"
3520-
" --force-fips force FIPS crypto (cannot be disabled)\n"
3521+
" --enable-fips enable FIPS crypto at startup\n"
3522+
" --force-fips force FIPS crypto (cannot be disabled)\n"
35213523
#endif /* NODE_FIPS_MODE */
3522-
" --openssl-config=path load OpenSSL configuration file from the\n"
3523-
" specified path\n"
3524+
" --openssl-config=path load OpenSSL configuration file from\n"
3525+
" the specified path\n"
35243526
#endif /* HAVE_OPENSSL */
35253527
#if defined(NODE_HAVE_I18N_SUPPORT)
3526-
" --icu-data-dir=dir set ICU data load path to dir\n"
3527-
" (overrides NODE_ICU_DATA)\n"
3528+
" --icu-data-dir=dir set ICU data load path to dir\n"
3529+
" (overrides NODE_ICU_DATA)\n"
35283530
#if !defined(NODE_HAVE_SMALL_ICU)
3529-
" note: linked-in ICU data is present\n"
3531+
" note: linked-in ICU data is present\n"
35303532
#endif
3531-
" --preserve-symlinks preserve symbolic links when resolving\n"
3532-
" and caching modules\n"
3533+
" --preserve-symlinks preserve symbolic links when resolving\n"
3534+
" and caching modules\n"
35333535
#endif
35343536
"\n"
35353537
"Environment variables:\n"
3536-
"NODE_DEBUG ','-separated list of core modules that\n"
3537-
" should print debug information\n"
3538-
"NODE_DISABLE_COLORS set to 1 to disable colors in the REPL\n"
3539-
"NODE_EXTRA_CA_CERTS path to additional CA certificates file\n"
3538+
"NODE_DEBUG ','-separated list of core modules\n"
3539+
" that should print debug information\n"
3540+
"NODE_DISABLE_COLORS set to 1 to disable colors in the REPL\n"
3541+
"NODE_EXTRA_CA_CERTS path to additional CA certificates\n"
3542+
" file\n"
35403543
#if defined(NODE_HAVE_I18N_SUPPORT)
3541-
"NODE_ICU_DATA data path for ICU (Intl object) data\n"
3544+
"NODE_ICU_DATA data path for ICU (Intl object) data\n"
35423545
#if !defined(NODE_HAVE_SMALL_ICU)
3543-
" (will extend linked-in data)\n"
3546+
" (will extend linked-in data)\n"
35443547
#endif
35453548
#endif
3546-
"NODE_NO_WARNINGS set to 1 to silence process warnings\n"
3549+
"NODE_NO_WARNINGS set to 1 to silence process warnings\n"
35473550
#ifdef _WIN32
3548-
"NODE_PATH ';'-separated list of directories\n"
3551+
"NODE_PATH ';'-separated list of directories\n"
35493552
#else
3550-
"NODE_PATH ':'-separated list of directories\n"
3553+
"NODE_PATH ':'-separated list of directories\n"
35513554
#endif
3552-
" prefixed to the module search path\n"
3553-
"NODE_REPL_HISTORY path to the persistent REPL history file\n"
3554-
"\n"
3555+
" prefixed to the module search path\n"
3556+
"NODE_REPL_HISTORY path to the persistent REPL history\n"
3557+
" file\n"
35553558
"Documentation can be found at https://nodejs.org/\n");
35563559
}
35573560

0 commit comments

Comments
 (0)