Go to file
Robin Krahl fefac9f2fc
Move doc::ItemType::group_id to the parser module
Previously, the doc::ItemType::group_id method returned the ID of the
section for the item type in the HTML documentation files.  This patch
refactors the method into the get_item_group_id function in the parser
module as it is an implementation detail of the HTML parser.
2020-08-17 11:45:46 +02:00
.builds Add integration tests 2020-08-11 09:31:20 +02:00
.reuse Add integration tests 2020-08-11 09:31:20 +02:00
LICENSES Initial project scaffolding 2020-07-19 14:10:54 +02:00
src Move doc::ItemType::group_id to the parser module 2020-08-17 11:45:46 +02:00
tests Add --width and --max-width options 2020-08-11 09:42:21 +02:00
.gitignore Initial project scaffolding 2020-07-19 14:10:54 +02:00
Cargo.lock Release v0.2.0 2020-08-11 10:31:03 +02:00
Cargo.toml Release v0.2.0 2020-08-11 10:31:03 +02:00
CHANGELOG.md Release v0.2.0 2020-08-11 10:31:03 +02:00
CONTRIBUTING.md Add integration tests 2020-08-11 09:31:20 +02:00
INSTALL.md Release v0.2.0 2020-08-11 10:31:03 +02:00
README.md Update installation instructions 2020-08-11 09:59:43 +02:00

rusty-man

$ rusty-man rusty-man | head -5
rusty-man                       Module rusty-man                       rusty-man

DESCRIPTION
      rusty-man is a command-line viewer for documentation generated by
      `rustdoc`.

Example Usage

Before running rusty-man, make sure that you generated the documentation with cargo doc:

$ cd rusty-man && cargo doc

Then you can open the documentation for an item:

$ rusty-man kuchiki::NodeRef

You dont have to specificy the full item name:

$ rusty-man NodeRef

If the documentation is not placed in ./target/doc or the Rust installation directory, you have to manually set the source path using the -s/--source option:

$ rusty-man --source my/other/crate/target/doc io::Error

If there are multiple matches for the keyword, rusty-man will show you a list of all matching items:

$ rusty-man --source my/other/crate/target/doc u8
Found mulitple matches for u8  select one of:

[ 0 ] core::u8: The 8-bit unsigned integer type.
[ 1 ] std::u8: The 8-bit unsigned integer type.

> 1

For more usage information, run rusty-man --help.

Installation

To install rusty-man from source, clone this repository and use cargo to build the project, or use cargo install. See the INSTALL.md file for more information. rusty-man is also available as a package for these distributions:

  • Arch Linux: rusty-man in the Arch User Repository

rusty-man should run on all platforms supported by crossterm. If you have trouble running rusty-man on your platform or if you want to help porting rusty-man to other platforms, please let me know.

Integrations

vim

You can set rusty-man as the keyword program with set keywordprg=rusty-man and then use K to open the documentation for the item under the cursor. If you want to apply this setting for all Rust files, add it to the ftplugin/rust.vim file in your vim runtime directory (e. g. ~/.vim).

Contributing

Contributions to this project are very welcome! You can contribute by writing code or documentation or by testing. See the CONTRIBUTING.md file for more information.

If you are looking for a good starting point, have a look at the issues with the label “good first issue” in rusty-mans issue tracker.

Minimum Supported Rust Version

This crate supports Rust 1.40 or later.

Contact

For bug reports, patches, feature requests or other messages, please send a mail to the mailing list ~ireas/rusty-man-dev@lists.sr.ht (public archive) or contact me directly. You can also use the rusty-man issue tracker for bug reports or features requests.

License

This project is licensed under the MIT License.

rusty-man complies with version 3.0 of the REUSE specification.