#[non_exhaustive]
pub enum Shell {
    Bash,
    Elvish,
    Fig,
    Fish,
    PowerShell,
    Zsh,
}
Expand description

A clap::ArgEnum for available shell completions.

Examples

Derive

use clap::{Parser, Subcommand};

#[derive(Parser)]
struct Cli {
    #[clap(subcommand)]
    command: Commands,
}

#[derive(Subcommand)]
enum Commands {
    Completion {
        #[clap(arg_enum)]
        shell: clap_complete_command::Shell,
    },
}

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.

Bash

Bourne Again SHell (bash)

Elvish

Elvish shell

Fig

Fig

Fish

Friendly Interactive SHell (fish)

PowerShell

PowerShell

Zsh

Z SHell (zsh)

Implementations

👎 Deprecated since 0.2.1:

Shell now implements Generator

Trait Implementations

All possible argument values, in display order.

The canonical argument value. Read more

Parse an argument into Self.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the file name that is created when this generator is called during compile time. Read more

Generates output out of clap::Command. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.