Skip to content

Commit 01a75a4

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
1 parent a165232 commit 01a75a4

File tree

2 files changed

+37
-19
lines changed

2 files changed

+37
-19
lines changed

doc/node.1

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,15 @@ Print stack traces for process warnings (including deprecations).
116116
Print a stack trace whenever synchronous I/O is detected after the first turn
117117
of the event loop.
118118

119+
.TP
120+
.BR \-\-trace\-events\-enabled
121+
Enables the collection of trace event tracing information.
122+
123+
.TP
124+
.BR \-\-trace\-event\-categories " " \fIcategories\fR
125+
A comma separated list of categories that should be traced when trace event
126+
tracing is enabled using \fB--trace-events-enabled\fR.
127+
119128
.TP
120129
.BR \-\-zero\-fill\-buffers
121130
Automatically zero-fills all newly allocated Buffer and SlowBuffer instances.
@@ -182,28 +191,36 @@ Specify ICU data load path. (overrides \fBNODE_ICU_DATA\fR)
182191
\',\'\-separated list of core modules that should print debug information.
183192

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

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

192205
.TP
193206
.BR NODE_ICU_DATA =\fIfile\fR
194207
Data path for ICU (Intl object) data. Will extend linked-in data when compiled
195208
with small\-icu support.
196209

210+
.TP
211+
.BR NODE_PATH =\fIpath\fR[:\fI...\fR]
212+
\':\'\-separated list of directories prefixed to the module search path.
213+
197214
.TP
198215
.BR NODE_REPL_HISTORY =\fIfile\fR
199216
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
217+
is \fB~/.node_repl_history\fR, which is overridden by this variable. Setting the
201218
value to an empty string ("" or " ") disables persistent REPL history.
202219

203220
.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.
221+
.BR NODE_TTY_UNSAFE_ASYNC =\fI1\fR
222+
When set to \fI1\fR, writes to stdout and stderr will be non-blocking and
223+
asynchronous when outputting to a TTY on platforms which support async stdio.
207224
Setting this will void any guarantee that stdio will not be interleaved or
208225
dropped at program exit. \fBAvoid use.\fR
209226

src/node.cc

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3482,8 +3482,7 @@ static void PrintHelp() {
34823482
"repeated)\n"
34833483
" --no-deprecation silence deprecation warnings\n"
34843484
" --trace-deprecation show stack traces on deprecations\n"
3485-
" --throw-deprecation throw an exception anytime a deprecated "
3486-
"function is used\n"
3485+
" --throw-deprecation throw an exception on deprecations\n"
34873486
" --no-warnings silence all process warnings\n"
34883487
" --trace-warnings show stack traces on process warnings\n"
34893488
" --trace-sync-io show stack trace when use of sync IO\n"
@@ -3514,27 +3513,29 @@ static void PrintHelp() {
35143513
" --icu-data-dir=dir set ICU data load path to dir\n"
35153514
" (overrides NODE_ICU_DATA)\n"
35163515
#if !defined(NODE_HAVE_SMALL_ICU)
3517-
" note: linked-in ICU data is\n"
3518-
" present.\n"
3516+
" note: linked-in ICU data is present\n"
35193517
#endif
35203518
" --preserve-symlinks preserve symbolic links when resolving\n"
3521-
" and caching modules.\n"
3519+
" and caching modules\n"
35223520
#endif
35233521
"\n"
35243522
"Environment variables:\n"
3525-
#ifdef _WIN32
3526-
"NODE_PATH ';'-separated list of directories\n"
3527-
#else
3528-
"NODE_PATH ':'-separated list of directories\n"
3529-
#endif
3530-
" prefixed to the module search path.\n"
3523+
"NODE_DEBUG ','-separated list of core modules that\n"
3524+
" should print debug information\n"
35313525
"NODE_DISABLE_COLORS set to 1 to disable colors in the REPL\n"
3526+
"NODE_EXTRA_CA_CERTS path to additional CA certificates file\n"
35323527
#if defined(NODE_HAVE_I18N_SUPPORT)
35333528
"NODE_ICU_DATA data path for ICU (Intl object) data\n"
35343529
#if !defined(NODE_HAVE_SMALL_ICU)
35353530
" (will extend linked-in data)\n"
35363531
#endif
35373532
#endif
3533+
#ifdef _WIN32
3534+
"NODE_PATH ';'-separated list of directories\n"
3535+
#else
3536+
"NODE_PATH ':'-separated list of directories\n"
3537+
#endif
3538+
" prefixed to the module search path\n"
35383539
"NODE_REPL_HISTORY path to the persistent REPL history file\n"
35393540
"\n"
35403541
"Documentation can be found at https://nodejs.org/\n");

0 commit comments

Comments
 (0)