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: https://github.com/nodejs/node/pull/10948 Fixes: https://github.com/nodejs/node/issues/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>
This commit is contained in:
parent
38161f0a95
commit
5d27cc1d0d
105
src/node.cc
105
src/node.cc
@ -3476,93 +3476,94 @@ void LoadEnvironment(Environment* env) {
|
||||
static void PrintHelp() {
|
||||
// XXX: If you add an option here, please also add it to doc/node.1 and
|
||||
// doc/api/cli.md
|
||||
printf("Usage: node [options] [ -e script | script.js ] [arguments] \n"
|
||||
" node debug script.js [arguments] \n"
|
||||
printf("Usage: node [options] [ -e script | script.js ] [arguments]\n"
|
||||
" node debug script.js [arguments]\n"
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -v, --version print Node.js version\n"
|
||||
" -e, --eval script evaluate script\n"
|
||||
" -p, --print evaluate script and print result\n"
|
||||
" -c, --check syntax check script without executing\n"
|
||||
" -i, --interactive always enter the REPL even if stdin\n"
|
||||
" does not appear to be a terminal\n"
|
||||
" -r, --require module to preload (option can be "
|
||||
" -v, --version print Node.js version\n"
|
||||
" -e, --eval script evaluate script\n"
|
||||
" -p, --print evaluate script and print result\n"
|
||||
" -c, --check syntax check script without executing\n"
|
||||
" -i, --interactive always enter the REPL even if stdin\n"
|
||||
" does not appear to be a terminal\n"
|
||||
" -r, --require module to preload (option can be "
|
||||
"repeated)\n"
|
||||
#if HAVE_INSPECTOR
|
||||
" --inspect[=host:port] activate inspector on host:port\n"
|
||||
" (default: 127.0.0.1:9229)\n"
|
||||
" --inspect[=host:port] activate inspector on host:port\n"
|
||||
" (default: 127.0.0.1:9229)\n"
|
||||
" --inspect-brk[=host:port] activate inspector on host:port\n"
|
||||
" and break at start of user script\n"
|
||||
#endif
|
||||
" --no-deprecation silence deprecation warnings\n"
|
||||
" --trace-deprecation show stack traces on deprecations\n"
|
||||
" --throw-deprecation throw an exception on deprecations\n"
|
||||
" --no-warnings silence all process warnings\n"
|
||||
" --trace-warnings show stack traces on process warnings\n"
|
||||
" --trace-sync-io show stack trace when use of sync IO\n"
|
||||
" is detected after the first tick\n"
|
||||
" --trace-events-enabled track trace events\n"
|
||||
" --trace-event-categories comma separated list of trace event\n"
|
||||
" categories to record\n"
|
||||
" --track-heap-objects track heap object allocations for heap "
|
||||
" --no-deprecation silence deprecation warnings\n"
|
||||
" --trace-deprecation show stack traces on deprecations\n"
|
||||
" --throw-deprecation throw an exception on deprecations\n"
|
||||
" --no-warnings silence all process warnings\n"
|
||||
" --trace-warnings show stack traces on process warnings\n"
|
||||
" --trace-sync-io show stack trace when use of sync IO\n"
|
||||
" is detected after the first tick\n"
|
||||
" --trace-events-enabled track trace events\n"
|
||||
" --trace-event-categories comma separated list of trace event\n"
|
||||
" categories to record\n"
|
||||
" --track-heap-objects track heap object allocations for heap "
|
||||
"snapshots\n"
|
||||
" --prof-process process v8 profiler output generated\n"
|
||||
" using --prof\n"
|
||||
" --zero-fill-buffers automatically zero-fill all newly "
|
||||
" --prof-process process v8 profiler output generated\n"
|
||||
" using --prof\n"
|
||||
" --zero-fill-buffers automatically zero-fill all newly "
|
||||
"allocated\n"
|
||||
" Buffer and SlowBuffer instances\n"
|
||||
" --v8-options print v8 command line options\n"
|
||||
" --v8-pool-size=num set v8's thread pool size\n"
|
||||
" Buffer and SlowBuffer instances\n"
|
||||
" --v8-options print v8 command line options\n"
|
||||
" --v8-pool-size=num set v8's thread pool size\n"
|
||||
#if HAVE_OPENSSL
|
||||
" --tls-cipher-list=val use an alternative default TLS cipher "
|
||||
" --tls-cipher-list=val use an alternative default TLS cipher "
|
||||
"list\n"
|
||||
" --use-bundled-ca use bundled CA store"
|
||||
" --use-bundled-ca use bundled CA store"
|
||||
#if !defined(NODE_OPENSSL_CERT_STORE)
|
||||
" (default)"
|
||||
#endif
|
||||
"\n"
|
||||
" --use-openssl-ca use OpenSSL's default CA store"
|
||||
" --use-openssl-ca use OpenSSL's default CA store"
|
||||
#if defined(NODE_OPENSSL_CERT_STORE)
|
||||
" (default)"
|
||||
#endif
|
||||
"\n"
|
||||
#if NODE_FIPS_MODE
|
||||
" --enable-fips enable FIPS crypto at startup\n"
|
||||
" --force-fips force FIPS crypto (cannot be disabled)\n"
|
||||
" --enable-fips enable FIPS crypto at startup\n"
|
||||
" --force-fips force FIPS crypto (cannot be disabled)\n"
|
||||
#endif /* NODE_FIPS_MODE */
|
||||
" --openssl-config=path load OpenSSL configuration file from the\n"
|
||||
" specified path\n"
|
||||
" --openssl-config=path load OpenSSL configuration file from\n"
|
||||
" the specified path\n"
|
||||
#endif /* HAVE_OPENSSL */
|
||||
#if defined(NODE_HAVE_I18N_SUPPORT)
|
||||
" --icu-data-dir=dir set ICU data load path to dir\n"
|
||||
" (overrides NODE_ICU_DATA)\n"
|
||||
" --icu-data-dir=dir set ICU data load path to dir\n"
|
||||
" (overrides NODE_ICU_DATA)\n"
|
||||
#if !defined(NODE_HAVE_SMALL_ICU)
|
||||
" note: linked-in ICU data is present\n"
|
||||
" note: linked-in ICU data is present\n"
|
||||
#endif
|
||||
" --preserve-symlinks preserve symbolic links when resolving\n"
|
||||
" and caching modules\n"
|
||||
" --preserve-symlinks preserve symbolic links when resolving\n"
|
||||
" and caching modules\n"
|
||||
#endif
|
||||
"\n"
|
||||
"Environment variables:\n"
|
||||
"NODE_DEBUG ','-separated list of core modules that\n"
|
||||
" should print debug information\n"
|
||||
"NODE_DISABLE_COLORS set to 1 to disable colors in the REPL\n"
|
||||
"NODE_EXTRA_CA_CERTS path to additional CA certificates file\n"
|
||||
"NODE_DEBUG ','-separated list of core modules\n"
|
||||
" that should print debug information\n"
|
||||
"NODE_DISABLE_COLORS set to 1 to disable colors in the REPL\n"
|
||||
"NODE_EXTRA_CA_CERTS path to additional CA certificates\n"
|
||||
" file\n"
|
||||
#if defined(NODE_HAVE_I18N_SUPPORT)
|
||||
"NODE_ICU_DATA data path for ICU (Intl object) data\n"
|
||||
"NODE_ICU_DATA data path for ICU (Intl object) data\n"
|
||||
#if !defined(NODE_HAVE_SMALL_ICU)
|
||||
" (will extend linked-in data)\n"
|
||||
" (will extend linked-in data)\n"
|
||||
#endif
|
||||
#endif
|
||||
"NODE_NO_WARNINGS set to 1 to silence process warnings\n"
|
||||
"NODE_NO_WARNINGS set to 1 to silence process warnings\n"
|
||||
#ifdef _WIN32
|
||||
"NODE_PATH ';'-separated list of directories\n"
|
||||
"NODE_PATH ';'-separated list of directories\n"
|
||||
#else
|
||||
"NODE_PATH ':'-separated list of directories\n"
|
||||
"NODE_PATH ':'-separated list of directories\n"
|
||||
#endif
|
||||
" prefixed to the module search path\n"
|
||||
"NODE_REPL_HISTORY path to the persistent REPL history file\n"
|
||||
"\n"
|
||||
" prefixed to the module search path\n"
|
||||
"NODE_REPL_HISTORY path to the persistent REPL history\n"
|
||||
" file\n"
|
||||
"Documentation can be found at https://nodejs.org/\n");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user