Skip to content

Commit

Permalink
docs: cargo-doc.browser -> doc.browser; mention in cargo-{rust,}d…
Browse files Browse the repository at this point in the history
…oc.1
  • Loading branch information
lf- committed May 21, 2021
1 parent 50486be commit 6128b54
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 14 deletions.
4 changes: 3 additions & 1 deletion src/doc/man/cargo-doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ is placed in `target/doc` in rustdoc's usual format.

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

{{#option "`--no-deps`" }}
Expand Down
4 changes: 3 additions & 1 deletion src/doc/man/cargo-rustdoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ or the `build.rustdocflags` [config value](../reference/config.html).

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

{{/options}}
Expand Down
4 changes: 3 additions & 1 deletion src/doc/man/generated_txt/cargo-doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ OPTIONS
--open
Open the docs in a browser after building them. This will use your
default browser unless you define another one in the BROWSER
environment variable.
environment variable or use the doc.browser
<https://doc.rust-lang.org/cargo/reference/config.html#docbrowser>
configuration option.

--no-deps
Do not build documentation for dependencies.
Expand Down
4 changes: 3 additions & 1 deletion src/doc/man/generated_txt/cargo-rustdoc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ OPTIONS
--open
Open the docs in a browser after building them. This will use your
default browser unless you define another one in the BROWSER
environment variable.
environment variable or use the doc.browser
<https://doc.rust-lang.org/cargo/reference/config.html#docbrowser>
configuration option.

Package Selection
By default, the package in the current working directory is selected.
Expand Down
4 changes: 3 additions & 1 deletion src/doc/src/commands/cargo-doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ is placed in `target/doc` in rustdoc's usual format.

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


<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>
Expand Down
4 changes: 3 additions & 1 deletion src/doc/src/commands/cargo-rustdoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ or the `build.rustdocflags` [config value](../reference/config.html).

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


</dl>
Expand Down
8 changes: 4 additions & 4 deletions src/doc/src/reference/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ incremental = true # whether or not to enable incremental compilation
dep-info-basedir = "" # path for the base directory for targets in depfiles
pipelining = true # rustc pipelining

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

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

#### `[cargo-doc]`
#### `[doc]`

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

##### `cargo-doc.browser`
##### `doc.browser`

This option sets the browser to be used by [`cargo doc`], overriding the
`BROWSER` environment variable when opening documentation with the `--open`
Expand Down
4 changes: 2 additions & 2 deletions src/doc/src/reference/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ system:
detail.
* `TERM` — If this is set to `dumb`, it disables the progress bar.
* `BROWSER` — The web browser to execute to open documentation with [`cargo
doc`]'s' `--open` flag, see [`cargo-doc.browser`] for more details.
doc`]'s' `--open` flag, see [`doc.browser`] for more details.
* `RUSTFMT` — Instead of running `rustfmt`,
[`cargo fmt`](https://github.com/rust-lang/rustfmt) will execute this specified
`rustfmt` instance instead.
Expand Down Expand Up @@ -134,7 +134,7 @@ supported environment variables are:
[`build.incremental`]: config.md#buildincremental
[`build.dep-info-basedir`]: config.md#builddep-info-basedir
[`build.pipelining`]: config.md#buildpipelining
[`cargo-doc.browser`]: config.md#cargo-docbrowser
[`doc.browser`]: config.md#docbrowser
[`cargo-new.name`]: config.md#cargo-newname
[`cargo-new.email`]: config.md#cargo-newemail
[`cargo-new.vcs`]: config.md#cargo-newvcs
Expand Down
4 changes: 3 additions & 1 deletion src/etc/man/cargo-doc.1
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ is placed in \fBtarget/doc\fR in rustdoc's usual format.
\fB\-\-open\fR
.RS 4
Open the docs in a browser after building them. This will use your default
browser unless you define another one in the \fBBROWSER\fR environment variable.
browser unless you define another one in the \fBBROWSER\fR environment variable
or use the \fI\f(BIdoc.browser\fI\fR <https://doc.rust\-lang.org/cargo/reference/config.html#docbrowser> configuration
option.
.RE
.sp
\fB\-\-no\-deps\fR
Expand Down
4 changes: 3 additions & 1 deletion src/etc/man/cargo-rustdoc.1
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ or the \fBbuild.rustdocflags\fR \fIconfig value\fR <https://doc.rust\-lang.org/c
\fB\-\-open\fR
.RS 4
Open the docs in a browser after building them. This will use your default
browser unless you define another one in the \fBBROWSER\fR environment variable.
browser unless you define another one in the \fBBROWSER\fR environment variable
or use the \fI\f(BIdoc.browser\fI\fR <https://doc.rust\-lang.org/cargo/reference/config.html#docbrowser> configuration
option.
.RE
.SS "Package Selection"
By default, the package in the current working directory is selected. The \fB\-p\fR
Expand Down

0 comments on commit 6128b54

Please sign in to comment.