Skip to content

Commit 6128b54

Browse files
committed
docs: cargo-doc.browser -> doc.browser; mention in cargo-{rust,}doc.1
1 parent 50486be commit 6128b54

File tree

10 files changed

+30
-14
lines changed

10 files changed

+30
-14
lines changed

src/doc/man/cargo-doc.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ is placed in `target/doc` in rustdoc's usual format.
2222

2323
{{#option "`--open`" }}
2424
Open the docs in a browser after building them. This will use your default
25-
browser unless you define another one in the `BROWSER` environment variable.
25+
browser unless you define another one in the `BROWSER` environment variable
26+
or use the [`doc.browser`](../reference/config.html#docbrowser) configuration
27+
option.
2628
{{/option}}
2729

2830
{{#option "`--no-deps`" }}

src/doc/man/cargo-rustdoc.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ or the `build.rustdocflags` [config value](../reference/config.html).
3434

3535
{{#option "`--open`" }}
3636
Open the docs in a browser after building them. This will use your default
37-
browser unless you define another one in the `BROWSER` environment variable.
37+
browser unless you define another one in the `BROWSER` environment variable
38+
or use the [`doc.browser`](../reference/config.html#docbrowser) configuration
39+
option.
3840
{{/option}}
3941

4042
{{/options}}

src/doc/man/generated_txt/cargo-doc.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ OPTIONS
1515
--open
1616
Open the docs in a browser after building them. This will use your
1717
default browser unless you define another one in the BROWSER
18-
environment variable.
18+
environment variable or use the doc.browser
19+
<https://doc.rust-lang.org/cargo/reference/config.html#docbrowser>
20+
configuration option.
1921

2022
--no-deps
2123
Do not build documentation for dependencies.

src/doc/man/generated_txt/cargo-rustdoc.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ OPTIONS
3434
--open
3535
Open the docs in a browser after building them. This will use your
3636
default browser unless you define another one in the BROWSER
37-
environment variable.
37+
environment variable or use the doc.browser
38+
<https://doc.rust-lang.org/cargo/reference/config.html#docbrowser>
39+
configuration option.
3840

3941
Package Selection
4042
By default, the package in the current working directory is selected.

src/doc/src/commands/cargo-doc.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ is placed in `target/doc` in rustdoc's usual format.
2222

2323
<dt class="option-term" id="option-cargo-doc---open"><a class="option-anchor" href="#option-cargo-doc---open"></a><code>--open</code></dt>
2424
<dd class="option-desc">Open the docs in a browser after building them. This will use your default
25-
browser unless you define another one in the <code>BROWSER</code> environment variable.</dd>
25+
browser unless you define another one in the <code>BROWSER</code> environment variable
26+
or use the <a href="../reference/config.html#docbrowser"><code>doc.browser</code></a> configuration
27+
option.</dd>
2628

2729

2830
<dt class="option-term" id="option-cargo-doc---no-deps"><a class="option-anchor" href="#option-cargo-doc---no-deps"></a><code>--no-deps</code></dt>

src/doc/src/commands/cargo-rustdoc.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ or the `build.rustdocflags` [config value](../reference/config.html).
3838

3939
<dt class="option-term" id="option-cargo-rustdoc---open"><a class="option-anchor" href="#option-cargo-rustdoc---open"></a><code>--open</code></dt>
4040
<dd class="option-desc">Open the docs in a browser after building them. This will use your default
41-
browser unless you define another one in the <code>BROWSER</code> environment variable.</dd>
41+
browser unless you define another one in the <code>BROWSER</code> environment variable
42+
or use the <a href="../reference/config.html#docbrowser"><code>doc.browser</code></a> configuration
43+
option.</dd>
4244

4345

4446
</dl>

src/doc/src/reference/config.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ incremental = true # whether or not to enable incremental compilation
6767
dep-info-basedir = "" # path for the base directory for targets in depfiles
6868
pipelining = true # rustc pipelining
6969

70-
[cargo-doc]
70+
[doc]
7171
browser = "chromium" # browser to use with `cargo doc --open`,
7272
# overrides the `BROWSER` environment variable
7373

@@ -400,11 +400,11 @@ directory.
400400
Controls whether or not build pipelining is used. This allows Cargo to
401401
schedule overlapping invocations of `rustc` in parallel when possible.
402402

403-
#### `[cargo-doc]`
403+
#### `[doc]`
404404

405-
The `[cargo-doc]` table defines options for the [`cargo doc`] command.
405+
The `[doc]` table defines options for the [`cargo doc`] command.
406406

407-
##### `cargo-doc.browser`
407+
##### `doc.browser`
408408

409409
This option sets the browser to be used by [`cargo doc`], overriding the
410410
`BROWSER` environment variable when opening documentation with the `--open`

src/doc/src/reference/environment-variables.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ system:
5252
detail.
5353
* `TERM` — If this is set to `dumb`, it disables the progress bar.
5454
* `BROWSER` — The web browser to execute to open documentation with [`cargo
55-
doc`]'s' `--open` flag, see [`cargo-doc.browser`] for more details.
55+
doc`]'s' `--open` flag, see [`doc.browser`] for more details.
5656
* `RUSTFMT` — Instead of running `rustfmt`,
5757
[`cargo fmt`](https://github.com/rust-lang/rustfmt) will execute this specified
5858
`rustfmt` instance instead.
@@ -134,7 +134,7 @@ supported environment variables are:
134134
[`build.incremental`]: config.md#buildincremental
135135
[`build.dep-info-basedir`]: config.md#builddep-info-basedir
136136
[`build.pipelining`]: config.md#buildpipelining
137-
[`cargo-doc.browser`]: config.md#cargo-docbrowser
137+
[`doc.browser`]: config.md#docbrowser
138138
[`cargo-new.name`]: config.md#cargo-newname
139139
[`cargo-new.email`]: config.md#cargo-newemail
140140
[`cargo-new.vcs`]: config.md#cargo-newvcs

src/etc/man/cargo-doc.1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ is placed in \fBtarget/doc\fR in rustdoc's usual format.
1616
\fB\-\-open\fR
1717
.RS 4
1818
Open the docs in a browser after building them. This will use your default
19-
browser unless you define another one in the \fBBROWSER\fR environment variable.
19+
browser unless you define another one in the \fBBROWSER\fR environment variable
20+
or use the \fI\f(BIdoc.browser\fI\fR <https://doc.rust\-lang.org/cargo/reference/config.html#docbrowser> configuration
21+
option.
2022
.RE
2123
.sp
2224
\fB\-\-no\-deps\fR

src/etc/man/cargo-rustdoc.1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ or the \fBbuild.rustdocflags\fR \fIconfig value\fR <https://doc.rust\-lang.org/c
3232
\fB\-\-open\fR
3333
.RS 4
3434
Open the docs in a browser after building them. This will use your default
35-
browser unless you define another one in the \fBBROWSER\fR environment variable.
35+
browser unless you define another one in the \fBBROWSER\fR environment variable
36+
or use the \fI\f(BIdoc.browser\fI\fR <https://doc.rust\-lang.org/cargo/reference/config.html#docbrowser> configuration
37+
option.
3638
.RE
3739
.SS "Package Selection"
3840
By default, the package in the current working directory is selected. The \fB\-p\fR

0 commit comments

Comments
 (0)