cargo-open

Crates.iocargo-open
lib.rscargo-open
version1.0.1
sourcesrc
created_at2015-08-23 17:20:35.498033
updated_at2024-05-16 12:22:40.995326
descriptionCargo command to open an installed crate in your editor
homepage
repositoryhttps://github.com/JonnieCache/cargo-open
max_upload_size
id2903
size18,046
Jonathan Davies (JonnieCache)

documentation

README

cargo-open

A cargo subcommand to open an installed crate in your $EDITOR, modelled on bundle open.

Note that the intended use is to open a crate's source for reading. Making changes to installed crates is not reccommended, and may produce unexpected results. Instead, clone the crate locally and specify the path in your Cargo.toml.

Installation

This is a binary crate, so it's installed manually rather than as a dependency:

cargo install cargo-open

Usage

cargo open clap

Configuration

The editor command is picked from the CARGO_EDITOR, VISUAL, or EDITOR environment variables, checked in that order.

Specify a different manifest file with the --manifest-path option. By default, Cargo.toml in the current directory is used.

Todo/Contributing

There aren't any tests, as this is just glueing together the cargo-metadata crate and some bits from the standard library. As such it should be robust, and what little logic there is should be adequately constrained by the type system.

Regardless, if you have any problems, suggestions or improvements, feel free to create an issue or PR.

This project uses cargo-readme to export this README from the doc comments.

Attribution

The original cargo-open was authored by Carol Nichols (@carols10cents), and crate ownership was transferred in may 2024. Many thanks to Carol for all her work in the rust community.

License: MIT

Commit count: 6

cargo fmt