Merge pull request #4789 from mochi-sann/fix-clap_ocmplete-example-doc

docs(clap_complete): clap_complete example documentation updated with corresponding file names
This commit is contained in:
Ed Page 2023-03-27 09:42:11 -05:00 committed by GitHub
commit 57d1c39dc5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 10 deletions

View file

@ -2,15 +2,15 @@
//!
//! Usage with zsh:
//! ```sh
//! cargo run --example value_hints_derive -- --generate=zsh > /usr/local/share/zsh/site-functions/_value_hints_derive
//! cargo run --example completion-derive -- --generate=zsh > /usr/local/share/zsh/site-functions/_completion_derive
//! compinit
//! ./target/debug/examples/value_hints_derive --<TAB>
//! ./target/debug/examples/completion_derive --<TAB>
//! ```
//! fish:
//! ```sh
//! cargo run --example value_hints_derive -- --generate=fish > value_hints_derive.fish
//! . ./value_hints_derive.fish
//! ./target/debug/examples/value_hints_derive --<TAB>
//! cargo run --example completion-derive -- --generate=fish > completion_derive.fish
//! . ./completion_derive.fish
//! ./target/debug/examples/completion_derive --<TAB>
//! ```
use clap::{Args, Command, CommandFactory, Parser, Subcommand, ValueHint};
use clap_complete::{generate, Generator, Shell};

View file

@ -2,15 +2,15 @@
//!
//! Usage with zsh:
//! ```sh
//! cargo run --example value_hints -- --generate=zsh > /usr/local/share/zsh/site-functions/_value_hints
//! cargo run --example completion -- --generate=zsh > /usr/local/share/zsh/site-functions/_completion
//! compinit
//! ./target/debug/examples/value_hints --<TAB>
//! ./target/debug/examples/completion --<TAB>
//! ```
//! fish:
//! ```sh
//! cargo run --example value_hints -- --generate=fish > value_hints.fish
//! . ./value_hints.fish
//! ./target/debug/examples/value_hints --<TAB>
//! cargo run --example completion -- --generate=fish > completion.fish
//! . ./completion.fish
//! ./target/debug/examples/completion --<TAB>
//! ```
use clap::{value_parser, Arg, Command, ValueHint};
use clap_complete::{generate, Generator, Shell};