Skip to content

Commit c205f67

Browse files
committed
doc: use command-line/command line consistently
Docs switch between "command line" and "command-line" with no apparent uniformity. Microsoft Style Guide prescribes "command line" as a noun and "command-line" as a modifier, which makes a lot of sense to me. Updating docs as appropriate. PR-URL: #35198 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent 18462e0 commit c205f67

File tree

13 files changed

+51
-51
lines changed

13 files changed

+51
-51
lines changed

doc/api/buffer.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3242,12 +3242,12 @@ if `size` is less than or equal to half [`Buffer.poolSize`][]. Instances
32423242
returned by [`Buffer.allocUnsafeSlow()`][] *never* use the shared internal
32433243
memory pool.
32443244

3245-
### The `--zero-fill-buffers` command line option
3245+
### The `--zero-fill-buffers` command-line option
32463246
<!-- YAML
32473247
added: v5.10.0
32483248
-->
32493249

3250-
Node.js can be started using the `--zero-fill-buffers` command line option to
3250+
Node.js can be started using the `--zero-fill-buffers` command-line option to
32513251
cause all newly-allocated `Buffer` instances to be zero-filled upon creation by
32523252
default. Without the option, buffers created with [`Buffer.allocUnsafe()`][],
32533253
[`Buffer.allocUnsafeSlow()`][], and `new SlowBuffer(size)` are not zero-filled.

doc/api/child_process.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ changes:
449449
* Returns: {ChildProcess}
450450

451451
The `child_process.spawn()` method spawns a new process using the given
452-
`command`, with command line arguments in `args`. If omitted, `args` defaults
452+
`command`, with command-line arguments in `args`. If omitted, `args` defaults
453453
to an empty array.
454454

455455
**If the `shell` option is enabled, do not pass unsanitized user input to this
@@ -1398,7 +1398,7 @@ the child process if any, else `null`.
13981398

13991399
* {Array}
14001400

1401-
The `subprocess.spawnargs` property represents the full list of command line
1401+
The `subprocess.spawnargs` property represents the full list of command-line
14021402
arguments the child process was launched with.
14031403

14041404
### `subprocess.spawnfile`
@@ -1547,7 +1547,7 @@ to `stdout` although there are only 4 characters.
15471547
## Shell requirements
15481548

15491549
The shell should understand the `-c` switch. If the shell is `'cmd.exe'`, it
1550-
should understand the `/d /s /c` switches and command line parsing should be
1550+
should understand the `/d /s /c` switches and command-line parsing should be
15511551
compatible.
15521552

15531553
## Default Windows shell

doc/api/cli.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Command line options
1+
# Command-line options
22

33
<!--introduced_in=v5.9.1-->
44
<!--type=misc-->
@@ -43,7 +43,7 @@ environment variable.
4343
added: v8.0.0
4444
-->
4545

46-
Alias for stdin. Analogous to the use of `-` in other command line utilities,
46+
Alias for stdin. Analogous to the use of `-` in other command-line utilities,
4747
meaning that the script is read from stdin, and the rest of the options
4848
are passed to that script.
4949

@@ -128,7 +128,7 @@ Specify the directory where the CPU profiles generated by `--cpu-prof` will
128128
be placed.
129129

130130
The default value is controlled by the
131-
[--diagnostic-dir](#cli_diagnostic_dir_directory) command line option.
131+
[--diagnostic-dir](#cli_diagnostic_dir_directory) command-line option.
132132

133133
### `--cpu-prof-interval`
134134
<!-- YAML
@@ -209,7 +209,7 @@ changes:
209209
-->
210210

211211
Experimental `AbortController` and `AbortSignal` support is enabled by default.
212-
Use of this command line flag is no longer required.
212+
Use of this command-line flag is no longer required.
213213

214214
### `--experimental-import-meta-resolve`
215215
<!-- YAML
@@ -383,7 +383,7 @@ Specify the directory where the heap profiles generated by `--heap-prof` will
383383
be placed.
384384

385385
The default value is controlled by the
386-
[--diagnostic-dir](#cli_diagnostic_dir_directory) command line option.
386+
[--diagnostic-dir](#cli_diagnostic_dir_directory) command-line option.
387387

388388
### `--heap-prof-interval`
389389
<!-- YAML
@@ -562,7 +562,7 @@ Emit pending deprecation warnings.
562562

563563
Pending deprecations are generally identical to a runtime deprecation with the
564564
notable exception that they are turned *off* by default and will not be emitted
565-
unless either the `--pending-deprecation` command line flag, or the
565+
unless either the `--pending-deprecation` command-line flag, or the
566566
`NODE_PENDING_DEPRECATION=1` environment variable, is set. Pending deprecations
567567
are used to provide a kind of selective "early warning" mechanism that
568568
developers may leverage to detect deprecated API usage.
@@ -608,7 +608,7 @@ be thrown if `moduleA` attempts to require `moduleB` as a peer dependency:
608608
└── package.json
609609
```
610610

611-
The `--preserve-symlinks` command line flag instructs Node.js to use the
611+
The `--preserve-symlinks` command-line flag instructs Node.js to use the
612612
symlink path for modules as opposed to the real path, allowing symbolically
613613
linked peer dependencies to be found.
614614

@@ -667,7 +667,7 @@ warning will be written to stderr instead.
667667

668668
The `file` name may be an absolute path. If it is not, the default directory it
669669
will be written to is controlled by the
670-
[--diagnostic-dir](#cli_diagnostic_dir_directory) command line option.
670+
[--diagnostic-dir](#cli_diagnostic_dir_directory) command-line option.
671671

672672
### `--report-compact`
673673
<!-- YAML
@@ -1066,7 +1066,7 @@ The following values are valid for `mode`:
10661066
added: v0.1.3
10671067
-->
10681068

1069-
Print V8 command line options.
1069+
Print V8 command-line options.
10701070

10711071
### `--v8-pool-size=num`
10721072
<!-- YAML
@@ -1123,7 +1123,7 @@ and `"` are usable.
11231123
added: v0.1.3
11241124
-->
11251125

1126-
Print node command line options.
1126+
Print node command-line options.
11271127
The output of this option is less detailed than this document.
11281128

11291129
### `-i`, `--interactive`
@@ -1218,8 +1218,8 @@ When set to `1`, process warnings are silenced.
12181218
added: v8.0.0
12191219
-->
12201220

1221-
A space-separated list of command line options. `options...` are interpreted
1222-
before command line options, so command line options will override or
1221+
A space-separated list of command-line options. `options...` are interpreted
1222+
before command-line options, so command-line options will override or
12231223
compound after anything in `options...`. Node.js will exit with an error if
12241224
an option that is not allowed in the environment is used, such as `-p` or a
12251225
script file.
@@ -1230,7 +1230,7 @@ If an option value contains a space, it can be escaped using double quotes:
12301230
NODE_OPTIONS='--require "./my path/file.js"'
12311231
```
12321232

1233-
A singleton flag passed as a command line option will override the same flag
1233+
A singleton flag passed as a command-line option will override the same flag
12341234
passed into `NODE_OPTIONS`:
12351235

12361236
```bash
@@ -1239,7 +1239,7 @@ NODE_OPTIONS='--inspect=localhost:4444' node --inspect=localhost:5555
12391239
```
12401240

12411241
A flag that can be passed multiple times will be treated as if its
1242-
`NODE_OPTIONS` instances were passed first, and then its command line
1242+
`NODE_OPTIONS` instances were passed first, and then its command-line
12431243
instances afterwards:
12441244

12451245
```bash
@@ -1365,7 +1365,7 @@ When set to `1`, emit pending deprecation warnings.
13651365

13661366
Pending deprecations are generally identical to a runtime deprecation with the
13671367
notable exception that they are turned *off* by default and will not be emitted
1368-
unless either the `--pending-deprecation` command line flag, or the
1368+
unless either the `--pending-deprecation` command-line flag, or the
13691369
`NODE_PENDING_DEPRECATION=1` environment variable, is set. Pending deprecations
13701370
are used to provide a kind of selective "early warning" mechanism that
13711371
developers may leverage to detect deprecated API usage.
@@ -1513,7 +1513,7 @@ Load an OpenSSL configuration file on startup. Among other uses, this can be
15131513
used to enable FIPS-compliant crypto if Node.js is built with `./configure
15141514
--openssl-fips`.
15151515

1516-
If the [`--openssl-config`][] command line option is used, the environment
1516+
If the [`--openssl-config`][] command-line option is used, the environment
15171517
variable is ignored.
15181518

15191519
### `SSL_CERT_DIR=dir`

doc/api/events.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ emitter.once('event', () => {
355355
});
356356
```
357357

358-
The [`--trace-warnings`][] command line flag can be used to display the
358+
The [`--trace-warnings`][] command-line flag can be used to display the
359359
stack trace for such warnings.
360360

361361
The emitted warning can be inspected with [`process.on('warning')`][] and will

doc/api/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* [C++ embedder API](embedding.html)
1919
* [Child processes](child_process.html)
2020
* [Cluster](cluster.html)
21-
* [Command line options](cli.html)
21+
* [Command-line options](cli.html)
2222
* [Console](console.html)
2323
* [Crypto](crypto.html)
2424
* [Debugger](debugger.html)

doc/api/process.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -442,16 +442,16 @@ $ node --no-warnings
442442
The `--trace-warnings` command-line option can be used to have the default
443443
console output for warnings include the full stack trace of the warning.
444444

445-
Launching Node.js using the `--throw-deprecation` command line flag will
445+
Launching Node.js using the `--throw-deprecation` command-line flag will
446446
cause custom deprecation warnings to be thrown as exceptions.
447447

448-
Using the `--trace-deprecation` command line flag will cause the custom
448+
Using the `--trace-deprecation` command-line flag will cause the custom
449449
deprecation to be printed to `stderr` along with the stack trace.
450450

451-
Using the `--no-deprecation` command line flag will suppress all reporting
451+
Using the `--no-deprecation` command-line flag will suppress all reporting
452452
of the custom deprecation.
453453

454-
The `*-deprecation` command line flags only affect warnings that use the name
454+
The `*-deprecation` command-line flags only affect warnings that use the name
455455
`'DeprecationWarning'`.
456456

457457
#### Emitting custom warnings
@@ -618,11 +618,11 @@ added: v0.1.27
618618

619619
* {string[]}
620620

621-
The `process.argv` property returns an array containing the command line
621+
The `process.argv` property returns an array containing the command-line
622622
arguments passed when the Node.js process was launched. The first element will
623623
be [`process.execPath`][]. See `process.argv0` if access to the original value
624624
of `argv[0]` is needed. The second element will be the path to the JavaScript
625-
file being executed. The remaining elements will be any additional command line
625+
file being executed. The remaining elements will be any additional command-line
626626
arguments.
627627

628628
For example, assuming the following script for `process-args.js`:
@@ -2420,7 +2420,7 @@ the current value of `ps`.
24202420
When a new value is assigned, different platforms will impose different maximum
24212421
length restrictions on the title. Usually such restrictions are quite limited.
24222422
For instance, on Linux and macOS, `process.title` is limited to the size of the
2423-
binary name plus the length of the command line arguments because setting the
2423+
binary name plus the length of the command-line arguments because setting the
24242424
`process.title` overwrites the `argv` memory of the process. Node.js v0.8
24252425
allowed for longer process title strings by also overwriting the `environ`
24262426
memory but that was potentially insecure and confusing in some (rather obscure)

doc/api/repl.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ Error: foo
224224

225225
#### `await` keyword
226226

227-
With the [`--experimental-repl-await`][] command line option specified,
227+
With the [`--experimental-repl-await`][] command-line option specified,
228228
experimental support for the `await` keyword is enabled.
229229

230230
```console
@@ -539,7 +539,7 @@ added: v11.10.0
539539
* `repl` {repl.REPLServer}
540540

541541
Initializes a history log file for the REPL instance. When executing the
542-
Node.js binary and using the command line REPL, a history file is initialized
542+
Node.js binary and using the command-line REPL, a history file is initialized
543543
by default. However, this is not the case when creating a REPL
544544
programmatically. Use this method to initialize a history log file when working
545545
with REPL instances programmatically.

doc/api/synopsis.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
`node [options] [V8 options] [script.js | -e "script" | - ] [arguments]`
99

10-
Please see the [Command Line Options][] document for more information.
10+
Please see the [Command-line options][] document for more information.
1111

1212
## Example
1313
An example of a [web server][] written with Node.js which responds with
@@ -86,6 +86,6 @@ Now, open any preferred web browser and visit `http://127.0.0.1:3000`.
8686
If the browser displays the string `Hello, World!`, that indicates
8787
the server is working.
8888

89-
[Command Line Options]: cli.html#cli_command_line_options
89+
[Command-line options]: cli.html#cli_command_line_options
9090
[this guide]: https://nodejs.org/en/download/package-manager/
9191
[web server]: http.html

doc/api/tls.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,10 +308,10 @@ HIGH
308308
!CAMELLIA
309309
```
310310

311-
This default can be replaced entirely using the [`--tls-cipher-list`][] command
312-
line switch (directly, or via the [`NODE_OPTIONS`][] environment variable). For
313-
instance, the following makes `ECDHE-RSA-AES128-GCM-SHA256:!RC4` the default TLS
314-
cipher suite:
311+
This default can be replaced entirely using the [`--tls-cipher-list`][]
312+
command-line switch (directly, or via the [`NODE_OPTIONS`][] environment
313+
variable). For instance, the following makes `ECDHE-RSA-AES128-GCM-SHA256:!RC4`
314+
the default TLS cipher suite:
315315

316316
```bash
317317
node --tls-cipher-list='ECDHE-RSA-AES128-GCM-SHA256:!RC4' server.js

doc/api/util.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,20 +217,20 @@ fn1(); // Emits a deprecation warning with code DEP0001
217217
fn2(); // Does not emit a deprecation warning because it has the same code
218218
```
219219

220-
If either the `--no-deprecation` or `--no-warnings` command line flags are
220+
If either the `--no-deprecation` or `--no-warnings` command-line flags are
221221
used, or if the `process.noDeprecation` property is set to `true` *prior* to
222222
the first deprecation warning, the `util.deprecate()` method does nothing.
223223

224-
If the `--trace-deprecation` or `--trace-warnings` command line flags are set,
224+
If the `--trace-deprecation` or `--trace-warnings` command-line flags are set,
225225
or the `process.traceDeprecation` property is set to `true`, a warning and a
226226
stack trace are printed to `stderr` the first time the deprecated function is
227227
called.
228228

229-
If the `--throw-deprecation` command line flag is set, or the
229+
If the `--throw-deprecation` command-line flag is set, or the
230230
`process.throwDeprecation` property is set to `true`, then an exception will be
231231
thrown when the deprecated function is called.
232232

233-
The `--throw-deprecation` command line flag and `process.throwDeprecation`
233+
The `--throw-deprecation` command-line flag and `process.throwDeprecation`
234234
property take precedence over `--trace-deprecation` and
235235
`process.traceDeprecation`.
236236

0 commit comments

Comments
 (0)