2020-10-16 10:31:20 +02:00
|
|
|
+++
|
|
|
|
title = "rman - Search the Rust Documentation offline"
|
|
|
|
date = 2020-06-23
|
|
|
|
[taxonomies]
|
2023-10-26 11:53:38 +02:00
|
|
|
tags = [ "rust", "documentation", "programming"]
|
2020-10-16 10:31:20 +02:00
|
|
|
+++
|
|
|
|
|
|
|
|
Want to search your local offline rust `std` documentation,
|
|
|
|
with a quick command from your terminal?
|
|
|
|
|
|
|
|
<!-- more -->
|
|
|
|
|
|
|
|
Preparation:
|
|
|
|
|
|
|
|
Download the rust documentation:
|
|
|
|
```console
|
|
|
|
$ rustup component add rust-docs
|
|
|
|
```
|
|
|
|
|
|
|
|
Setup a bash function (you might need to replace `firefox` with your browser):
|
|
|
|
```bash
|
|
|
|
function rman() {
|
|
|
|
firefox "file://$(rustc --print sysroot)/share/doc/rust/html/std/index.html?search=$@"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
Fire up your browser with the search window from your terminal:
|
|
|
|
```console
|
|
|
|
$ rman MaybeUnit
|
|
|
|
```
|
|
|
|
|
2023-10-26 11:53:38 +02:00
|
|
|
Ok... it's not `man` and `apropos` ... but good enough for now.
|