-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add command line option to print URL/path/link to generated documentation #5562
Comments
Sounds like a reasonable idea to me! |
@esteve no I hadn't gotten to it, this is great! |
Any update on this? A |
As someone who uses Windows/WSL2, it would be nice to have From a bash window, if I run this:
... Firefox opens to the Rust documentation I want. Could |
Simple workaround: |
@janpaul123 Clever! Although to be clear I'd still like to have proper support; this is a wonderful hack but still a hack haha |
I've wanted something like this myself. I dislike using `--open` because I tend to move up to re-run my `cargo doc` run but then have to edit it to remove `--open`. Also makes it annoying when opening docs when `cargo doc` is wrapped by a tool like `make`. This was previously attempted in rust-lang#5592: - Unlike the request in rust-lang#5562, this aligns with rust-lang#5592 in always printing rather than using a flag as this seems generally useful - Unlike rust-lang#5592, this prints as an alternative to "Opening" to keep things light - Unlike rust-lang#5592, this prints afterwards as the link is only valid then Fixes rust-lang#5562
I've wanted something like this myself. I dislike using `--open` because I tend to move up to re-run my `cargo doc` run but then have to edit it to remove `--open`. Also makes it annoying when opening docs when `cargo doc` is wrapped by a tool like `make`. This was previously attempted in rust-lang#5592: - Unlike the request in rust-lang#5562, this aligns with rust-lang#5592 in always printing rather than using a flag as this seems generally useful - Unlike rust-lang#5592, this prints as an alternative to "Opening" to keep things light - Unlike rust-lang#5592, this prints afterwards as the link is only valid then Fixes rust-lang#5562
I've wanted something like this myself. I dislike using `--open` because I tend to move up to re-run my `cargo doc` run but then have to edit it to remove `--open`. Also makes it annoying when opening docs when `cargo doc` is wrapped by a tool like `make`. This was previously attempted in rust-lang#5592: - Unlike the request in rust-lang#5562, this aligns with rust-lang#5592 in always printing rather than using a flag as this seems generally useful - Unlike rust-lang#5592, this prints as an alternative to "Opening" to keep things light - Unlike rust-lang#5592, this prints afterwards as the link is only valid then Fixes rust-lang#5562
I've wanted something like this myself. I dislike using `--open` because I tend to move up to re-run my `cargo doc` run but then have to edit it to remove `--open`. Also makes it annoying when opening docs when `cargo doc` is wrapped by a tool like `make`. This was previously attempted in rust-lang#5592: - Unlike the request in rust-lang#5562, this aligns with rust-lang#5592 in always printing rather than using a flag as this seems generally useful - Unlike rust-lang#5592, this prints as an alternative to "Opening" to keep things light - Unlike rust-lang#5592, this prints afterwards as the link is only valid then Fixes rust-lang#5562
I've wanted something like this myself. I dislike using `--open` because I tend to move up to re-run my `cargo doc` run but then have to edit it to remove `--open`. Also makes it annoying when opening docs when `cargo doc` is wrapped by a tool like `make`. This was previously attempted in rust-lang#5592: - Unlike the request in rust-lang#5562, this aligns with rust-lang#5592 in always printing rather than using a flag as this seems generally useful - Unlike rust-lang#5592, this prints as an alternative to "Opening" to keep things light - Unlike rust-lang#5592, this prints afterwards as the link is only valid then Fixes rust-lang#5562
I've wanted something like this myself. I dislike using `--open` because I tend to move up to re-run my `cargo doc` run but then have to edit it to remove `--open`. Also makes it annoying when opening docs when `cargo doc` is wrapped by a tool like `make`. This was previously attempted in rust-lang#5592: - Unlike the request in rust-lang#5562, this aligns with rust-lang#5592 in always printing rather than using a flag as this seems generally useful - Unlike rust-lang#5592, this prints as an alternative to "Opening" to keep things light - Unlike rust-lang#5592, this prints afterwards as the link is only valid then Fixes rust-lang#5562
I've wanted something like this myself. I dislike using `--open` because I tend to move up to re-run my `cargo doc` run but then have to edit it to remove `--open`. Also makes it annoying when opening docs when `cargo doc` is wrapped by a tool like `make`. This was previously attempted in rust-lang#5592: - Unlike the request in rust-lang#5562, this aligns with rust-lang#5592 in always printing rather than using a flag as this seems generally useful - Unlike rust-lang#5592, this prints as an alternative to "Opening" to keep things light - Unlike rust-lang#5592, this prints afterwards as the link is only valid then Fixes rust-lang#5562
I've wanted something like this myself. I dislike using `--open` because I tend to move up to re-run my `cargo doc` run but then have to edit it to remove `--open`. Also makes it annoying when opening docs when `cargo doc` is wrapped by a tool like `make`. This was previously attempted in rust-lang#5592: - Unlike the request in rust-lang#5562, this aligns with rust-lang#5592 in always printing rather than using a flag as this seems generally useful - Unlike rust-lang#5592, this prints as an alternative to "Opening" to keep things light - Unlike rust-lang#5592, this prints afterwards as the link is only valid then Fixes rust-lang#5562
I've wanted something like this myself. I dislike using `--open` because I tend to move up to re-run my `cargo doc` run but then have to edit it to remove `--open`. Also makes it annoying when opening docs when `cargo doc` is wrapped by a tool like `make`. This was previously attempted in rust-lang#5592: - Unlike the request in rust-lang#5562, this aligns with rust-lang#5592 in always printing rather than using a flag as this seems generally useful - Unlike rust-lang#5592, this prints as an alternative to "Opening" to keep things light - Unlike rust-lang#5592, this prints afterwards as the link is only valid then Fixes rust-lang#5562
feat(doc): Print the generated docs links I've wanted something like this myself. I dislike using `--open` because I tend to move up to re-run my `cargo doc` run but then have to edit it to remove `--open`. Also makes it annoying when opening docs when `cargo doc` is wrapped by a tool like `make`. This was previously attempted in #5592: - Unlike the request in #5562, this aligns with #5592 in always printing rather than using a flag as this seems generally useful - Unlike #5592, this prints as an alternative to "Opening" to keep things light - Unlike #5592, this prints afterwards as the link is only valid then Fixes #5562
I use
cargo doc --open
to generate/update docs and open them in a browser, but often I want to view them in a non-default browser. Sometimes I want to use the viewer built into my IDE, sometimes I'm testing out a new browser, etc.It would be nice if either
cargo doc
printed the URL/path/link to the newly generated docs when it was done (similar to howcargo test
prints "Running target/debug/deps/foo"), or if a new option likecargo doc --link
,cargo doc --url
, etc could be added to do this.If either of these sounds like a reasonable idea I could take a crack at putting a pull request together?
The text was updated successfully, but these errors were encountered: