Browse Source

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>
v6
Aashil Patel 8 years ago
committed by Rich Trott
parent
commit
5d27cc1d0d
  1. 105
      src/node.cc

105
src/node.cc

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

Loading…
Cancel
Save