Skip to content

Commit c1c93a6

Browse files
Trottruyadorno
authored andcommitted
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 70ec369 commit c1c93a6

File tree

13 files changed

+50
-50
lines changed

13 files changed

+50
-50
lines changed

doc/api/buffer.md

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

3232-
### The `--zero-fill-buffers` command line option
3232+
### The `--zero-fill-buffers` command-line option
32333233
<!-- YAML
32343234
added: v5.10.0
32353235
-->
32363236

3237-
Node.js can be started using the `--zero-fill-buffers` command line option to
3237+
Node.js can be started using the `--zero-fill-buffers` command-line option to
32383238
cause all newly-allocated `Buffer` instances to be zero-filled upon creation by
32393239
default. Without the option, buffers created with [`Buffer.allocUnsafe()`][],
32403240
[`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: 15 additions & 15 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
@@ -369,7 +369,7 @@ Specify the directory where the heap profiles generated by `--heap-prof` will
369369
be placed.
370370

371371
The default value is controlled by the
372-
[--diagnostic-dir](#cli_diagnostic_dir_directory) command line option.
372+
[--diagnostic-dir](#cli_diagnostic_dir_directory) command-line option.
373373

374374
### `--heap-prof-interval`
375375
<!-- YAML
@@ -548,7 +548,7 @@ Emit pending deprecation warnings.
548548

549549
Pending deprecations are generally identical to a runtime deprecation with the
550550
notable exception that they are turned *off* by default and will not be emitted
551-
unless either the `--pending-deprecation` command line flag, or the
551+
unless either the `--pending-deprecation` command-line flag, or the
552552
`NODE_PENDING_DEPRECATION=1` environment variable, is set. Pending deprecations
553553
are used to provide a kind of selective "early warning" mechanism that
554554
developers may leverage to detect deprecated API usage.
@@ -594,7 +594,7 @@ be thrown if `moduleA` attempts to require `moduleB` as a peer dependency:
594594
└── package.json
595595
```
596596

597-
The `--preserve-symlinks` command line flag instructs Node.js to use the
597+
The `--preserve-symlinks` command-line flag instructs Node.js to use the
598598
symlink path for modules as opposed to the real path, allowing symbolically
599599
linked peer dependencies to be found.
600600

@@ -653,7 +653,7 @@ warning will be written to stderr instead.
653653

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

658658
### `--report-compact`
659659
<!-- YAML
@@ -1033,7 +1033,7 @@ The following values are valid for `mode`:
10331033
added: v0.1.3
10341034
-->
10351035

1036-
Print V8 command line options.
1036+
Print V8 command-line options.
10371037

10381038
### `--v8-pool-size=num`
10391039
<!-- YAML
@@ -1090,7 +1090,7 @@ and `"` are usable.
10901090
added: v0.1.3
10911091
-->
10921092

1093-
Print node command line options.
1093+
Print node command-line options.
10941094
The output of this option is less detailed than this document.
10951095

10961096
### `-i`, `--interactive`
@@ -1185,8 +1185,8 @@ When set to `1`, process warnings are silenced.
11851185
added: v8.0.0
11861186
-->
11871187

1188-
A space-separated list of command line options. `options...` are interpreted
1189-
before command line options, so command line options will override or
1188+
A space-separated list of command-line options. `options...` are interpreted
1189+
before command-line options, so command-line options will override or
11901190
compound after anything in `options...`. Node.js will exit with an error if
11911191
an option that is not allowed in the environment is used, such as `-p` or a
11921192
script file.
@@ -1197,7 +1197,7 @@ If an option value contains a space, it can be escaped using double quotes:
11971197
NODE_OPTIONS='--require "./my path/file.js"'
11981198
```
11991199

1200-
A singleton flag passed as a command line option will override the same flag
1200+
A singleton flag passed as a command-line option will override the same flag
12011201
passed into `NODE_OPTIONS`:
12021202

12031203
```bash
@@ -1206,7 +1206,7 @@ NODE_OPTIONS='--inspect=localhost:4444' node --inspect=localhost:5555
12061206
```
12071207

12081208
A flag that can be passed multiple times will be treated as if its
1209-
`NODE_OPTIONS` instances were passed first, and then its command line
1209+
`NODE_OPTIONS` instances were passed first, and then its command-line
12101210
instances afterwards:
12111211

12121212
```bash
@@ -1331,7 +1331,7 @@ When set to `1`, emit pending deprecation warnings.
13311331

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

1482-
If the [`--openssl-config`][] command line option is used, the environment
1482+
If the [`--openssl-config`][] command-line option is used, the environment
14831483
variable is ignored.
14841484

14851485
### `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
@@ -440,16 +440,16 @@ $ node --no-warnings
440440
The `--trace-warnings` command-line option can be used to have the default
441441
console output for warnings include the full stack trace of the warning.
442442

443-
Launching Node.js using the `--throw-deprecation` command line flag will
443+
Launching Node.js using the `--throw-deprecation` command-line flag will
444444
cause custom deprecation warnings to be thrown as exceptions.
445445

446-
Using the `--trace-deprecation` command line flag will cause the custom
446+
Using the `--trace-deprecation` command-line flag will cause the custom
447447
deprecation to be printed to `stderr` along with the stack trace.
448448

449-
Using the `--no-deprecation` command line flag will suppress all reporting
449+
Using the `--no-deprecation` command-line flag will suppress all reporting
450450
of the custom deprecation.
451451

452-
The `*-deprecation` command line flags only affect warnings that use the name
452+
The `*-deprecation` command-line flags only affect warnings that use the name
453453
`'DeprecationWarning'`.
454454

455455
#### Emitting custom warnings
@@ -616,11 +616,11 @@ added: v0.1.27
616616

617617
* {string[]}
618618

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

626626
For example, assuming the following script for `process-args.js`:
@@ -2398,7 +2398,7 @@ the current value of `ps`.
23982398
When a new value is assigned, different platforms will impose different maximum
23992399
length restrictions on the title. Usually such restrictions are quite limited.
24002400
For instance, on Linux and macOS, `process.title` is limited to the size of the
2401-
binary name plus the length of the command line arguments because setting the
2401+
binary name plus the length of the command-line arguments because setting the
24022402
`process.title` overwrites the `argv` memory of the process. Node.js v0.8
24032403
allowed for longer process title strings by also overwriting the `environ`
24042404
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
@@ -537,7 +537,7 @@ added: v11.10.0
537537
* `repl` {repl.REPLServer}
538538

539539
Initializes a history log file for the REPL instance. When executing the
540-
Node.js binary and using the command line REPL, a history file is initialized
540+
Node.js binary and using the command-line REPL, a history file is initialized
541541
by default. However, this is not the case when creating a REPL
542542
programmatically. Use this method to initialize a history log file when working
543543
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)