mirror of
https://github.com/clap-rs/clap
synced 2025-03-04 15:27:16 +00:00
doc: some formatting fixes
This commit is contained in:
parent
4f3155897a
commit
2ebde60d5a
1 changed files with 23 additions and 12 deletions
35
src/lib.rs
35
src/lib.rs
|
@ -277,16 +277,22 @@
|
|||
//!
|
||||
//! ### BYOB (Build Your Own Binary)
|
||||
//!
|
||||
//! To test out `clap`'s default auto-generated help/version follow these steps:
|
||||
//! * Create a new cargo project `$ cargo new fake --bin && cd fake`
|
||||
//! * Add `clap` to your `Cargo.toml`
|
||||
//! *
|
||||
//! ```toml
|
||||
//! [dependencies]
|
||||
//! clap = "2"
|
||||
//! ```
|
||||
//! To test `clap`'s default auto-generated help/version, follow these steps:
|
||||
//!
|
||||
//! * Add the following to your `src/main.rs`
|
||||
//! * Create a new cargo project:
|
||||
//!
|
||||
//! ```ignore
|
||||
//! cargo new fake --bin && cd fake
|
||||
//! ```
|
||||
//!
|
||||
//! * Add `clap` to your `Cargo.toml`:
|
||||
//!
|
||||
//! ```toml
|
||||
//! [dependencies]
|
||||
//! clap = "2"
|
||||
//! ```
|
||||
//!
|
||||
//! * Add the following to your `src/main.rs`:
|
||||
//!
|
||||
//! ```no_run
|
||||
//! extern crate clap;
|
||||
|
@ -297,8 +303,13 @@
|
|||
//! }
|
||||
//! ```
|
||||
//!
|
||||
//! * Build your program `$ cargo build --release`
|
||||
//! * Run with help or version `$ ./target/release/fake --help` or `$ ./target/release/fake --version`
|
||||
//! * Build your program, then run it:
|
||||
//!
|
||||
//! ```ignore
|
||||
//! cargo build --release
|
||||
//! ./target/release/fake --help
|
||||
//! ./target/release/fake --version
|
||||
//! ```
|
||||
//!
|
||||
//! ## Usage
|
||||
//!
|
||||
|
@ -444,4 +455,4 @@ mod completions;
|
|||
|
||||
const INTERNAL_ERROR_MSG: &'static str = "Fatal internal error. Please consider filing a bug \
|
||||
report at https://github.com/kbknapp/clap-rs/issues";
|
||||
const INVALID_UTF8: &'static str = "unexpected invalid UTF-8 code point";
|
||||
const INVALID_UTF8: &'static str = "unexpected invalid UTF-8 code point";
|
||||
|
|
Loading…
Add table
Reference in a new issue