Skip to content

Commit ee62961

Browse files
committed
src/doc: improve man page and --help
- add missing environment variables to --help - add missing flags to man page - sort environment variables alphabetically - add some highlighting to the man page - remove stops from descriptions in --help for consistency - few other minor tweaks to --help PR-URL: nodejs#10157 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
1 parent e07b651 commit ee62961

File tree

2 files changed

+32
-23
lines changed

2 files changed

+32
-23
lines changed

doc/node.1

+16-8
Original file line numberDiff line numberDiff line change
@@ -182,28 +182,36 @@ Specify ICU data load path. (overrides \fBNODE_ICU_DATA\fR)
182182
\',\'\-separated list of core modules that should print debug information.
183183

184184
.TP
185-
.BR NODE_PATH =\fIpath\fR[:\fI...\fR]
186-
\':\'\-separated list of directories prefixed to the module search path.
185+
.BR NODE_DISABLE_COLORS =\fI1\fR
186+
When set to \fI1\fR, colors will not be used in the REPL.
187187

188188
.TP
189-
.BR NODE_DISABLE_COLORS=1
190-
When set to 1 colors will not be used in the REPL.
189+
.BR NODE_EXTRA_CA_CERTS =\fIfile\fR
190+
When set, the well known "root" CAs (like VeriSign) will be extended with the
191+
extra certificates in \fIfile\fR. The file should consist of one or more
192+
trusted certificates in PEM format. A message will be emitted (once) with
193+
\fBprocess.emitWarning()\fR if the file is missing or misformatted, but any
194+
errors are otherwise ignored.
191195

192196
.TP
193197
.BR NODE_ICU_DATA =\fIfile\fR
194198
Data path for ICU (Intl object) data. Will extend linked-in data when compiled
195199
with small\-icu support.
196200

201+
.TP
202+
.BR NODE_PATH =\fIpath\fR[:\fI...\fR]
203+
\':\'\-separated list of directories prefixed to the module search path.
204+
197205
.TP
198206
.BR NODE_REPL_HISTORY =\fIfile\fR
199207
Path to the file used to store the persistent REPL history. The default path
200-
is ~/.node_repl_history, which is overridden by this variable. Setting the
208+
is \fB~/.node_repl_history\fR, which is overridden by this variable. Setting the
201209
value to an empty string ("" or " ") disables persistent REPL history.
202210

203211
.TP
204-
.BR NODE_TTY_UNSAFE_ASYNC=1
205-
When set to 1, writes to stdout and stderr will be non-blocking and asynchronous
206-
when outputting to a TTY on platforms which support async stdio.
212+
.BR NODE_TTY_UNSAFE_ASYNC =\fI1\fR
213+
When set to \fI1\fR, writes to stdout and stderr will be non-blocking and
214+
asynchronous when outputting to a TTY on platforms which support async stdio.
207215
Setting this will void any guarantee that stdio will not be interleaved or
208216
dropped at program exit. \fBAvoid use.\fR
209217

src/node.cc

+16-15
Original file line numberDiff line numberDiff line change
@@ -3569,8 +3569,7 @@ static void PrintHelp() {
35693569
" -r, --require module to preload (option can be repeated)\n"
35703570
" --no-deprecation silence deprecation warnings\n"
35713571
" --trace-deprecation show stack traces on deprecations\n"
3572-
" --throw-deprecation throw an exception anytime a deprecated "
3573-
"function is used\n"
3572+
" --throw-deprecation throw an exception on deprecations\n"
35743573
" --no-warnings silence all process warnings\n"
35753574
" --trace-warnings show stack traces on process warnings\n"
35763575
" --trace-sync-io show stack trace when use of sync IO\n"
@@ -3596,28 +3595,30 @@ static void PrintHelp() {
35963595
" --icu-data-dir=dir set ICU data load path to dir\n"
35973596
" (overrides NODE_ICU_DATA)\n"
35983597
#if !defined(NODE_HAVE_SMALL_ICU)
3599-
" note: linked-in ICU data is\n"
3600-
" present.\n"
3598+
" note: linked-in ICU data is present\n"
36013599
#endif
36023600
" --preserve-symlinks preserve symbolic links when resolving\n"
3603-
" and caching modules.\n"
3601+
" and caching modules\n"
36043602
#endif
36053603
"\n"
36063604
"Environment variables:\n"
3607-
#ifdef _WIN32
3608-
"NODE_PATH ';'-separated list of directories\n"
3609-
#else
3610-
"NODE_PATH ':'-separated list of directories\n"
3611-
#endif
3612-
" prefixed to the module search path.\n"
3613-
"NODE_DISABLE_COLORS set to 1 to disable colors in the REPL\n"
3605+
"NODE_DEBUG ','-separated list of core modules that\n"
3606+
" should print debug information\n"
3607+
"NODE_DISABLE_COLORS set to 1 to disable colors in the REPL\n"
3608+
"NODE_EXTRA_CA_CERTS path to additional CA certificates file\n"
36143609
#if defined(NODE_HAVE_I18N_SUPPORT)
3615-
"NODE_ICU_DATA data path for ICU (Intl object) data\n"
3610+
"NODE_ICU_DATA data path for ICU (Intl object) data\n"
36163611
#if !defined(NODE_HAVE_SMALL_ICU)
3617-
" (will extend linked-in data)\n"
3612+
" (will extend linked-in data)\n"
36183613
#endif
36193614
#endif
3620-
"NODE_REPL_HISTORY path to the persistent REPL history file\n"
3615+
#ifdef _WIN32
3616+
"NODE_PATH ';'-separated list of directories\n"
3617+
#else
3618+
"NODE_PATH ':'-separated list of directories\n"
3619+
#endif
3620+
" prefixed to the module search path\n"
3621+
"NODE_REPL_HISTORY path to the persistent REPL history file\n"
36213622
"\n"
36223623
"Documentation can be found at https://nodejs.org/\n");
36233624
}

0 commit comments

Comments
 (0)