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 d9a641b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
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
@@ -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
16 changes: 8 additions & 8 deletions clap_complete/examples/completion.rs
@@ -1,16 +1,16 @@
//! Example to test arguments with different ValueHint values.
//!
//! Usage with zsh:
//! ```sh
//! cargo run --example completion -- --generate=zsh > /usr/local/share/zsh/site-functions/_completion
//! compinit
//! ./target/debug/examples/completion --<TAB>
//! ```console
//! $ cargo run --example completion -- --generate=zsh > /usr/local/share/zsh/site-functions/_completion$
//! $ compinit
//! $ ./target/debug/examples/completion --<TAB>
//! ```
//! fish:
//! ```sh
//! cargo run --example completion -- --generate=fish > completion.fish
//! . ./completion.fish
//! ./target/debug/examples/completion --<TAB>
//! ```console
//! $ 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};
Expand Down
2 changes: 1 addition & 1 deletion clap_complete/src/generator/mod.rs
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 d9a641b

Please sign in to comment.