Skip to content

Commit

Permalink
docs: Consistently use console fence type
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Mar 25, 2023
1 parent 5b65ede commit 2bedccc
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Note: We have not yet determined the End-of-Life schedule for previous major ver
### Verifying Changes

A common (sub)set of commands for verifying your change:
```sh
```console
$ make test-full
$ make clippy-full
$ make doc
Expand Down
16 changes: 8 additions & 8 deletions clap_complete/examples/completion-derive.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
//! How to use value hints and generate shell completions.
//!
//! Usage with zsh:
//! ```sh
//! cargo run --example completion-derive -- --generate=zsh > /usr/local/share/zsh/site-functions/_completion_derive
//! compinit
//! ./target/debug/examples/completion_derive --<TAB>
//! ```console
//! $ cargo run --example completion-derive -- --generate=zsh > /usr/local/share/zsh/site-functions/_completion_derive
//! $ compinit
//! $ ./target/debug/examples/completion_derive --<TAB>
//! ```
//! fish:
//! ```sh
//! cargo run --example completion-derive -- --generate=fish > completion_derive.fish
//! . ./completion_derive.fish
//! ./target/debug/examples/completion_derive --<TAB>
//! ```console
//! $ 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};
Expand Down
24 changes: 24 additions & 0 deletions clap_complete/examples/completion.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,40 @@
//! Example to test arguments with different ValueHint values.
//!
//! Usage with zsh:
<<<<<<< HEAD
//! ```sh
//! cargo run --example completion -- --generate=zsh > /usr/local/share/zsh/site-functions/_completion
//! compinit
//! ./target/debug/examples/completion --<TAB>
||||||| parent of 01aebc05 (docs: Consistently use console fence type)
//! ```sh
//! cargo run --example value_hints -- --generate=zsh > /usr/local/share/zsh/site-functions/_value_hints
//! compinit
//! ./target/debug/examples/value_hints --<TAB>
=======
//! ```console
//! $ cargo run --example value_hints -- --generate=zsh > /usr/local/share/zsh/site-functions/_value_hints
//! $ compinit
//! $ ./target/debug/examples/value_hints --<TAB>
>>>>>>> 01aebc05 (docs: Consistently use console fence type)
//! ```
//! fish:
<<<<<<< HEAD
//! ```sh
//! cargo run --example completion -- --generate=fish > completion.fish
//! . ./completion.fish
//! ./target/debug/examples/completion --<TAB>
||||||| parent of 01aebc05 (docs: Consistently use console fence type)
//! ```sh
//! cargo run --example value_hints -- --generate=fish > value_hints.fish
//! . ./value_hints.fish
//! ./target/debug/examples/value_hints --<TAB>
=======
//! ```console
//! $ cargo run --example value_hints -- --generate=fish > value_hints.fish
//! $ . ./value_hints.fish
//! $ ./target/debug/examples/value_hints --<TAB>
>>>>>>> 01aebc05 (docs: Consistently use console fence type)
//! ```
use clap::{value_parser, Arg, Command, ValueHint};
use clap_complete::{generate, Generator, Shell};
Expand Down
2 changes: 1 addition & 1 deletion clap_complete/src/generator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ where
///
/// Usage:
///
/// ```shell
/// ```console
/// $ myapp generate-bash-completions > /usr/share/bash-completion/completions/myapp.bash
/// ```
pub fn generate<G, S>(gen: G, cmd: &mut clap::Command, bin_name: S, buf: &mut dyn Write)
Expand Down

0 comments on commit 2bedccc

Please sign in to comment.