pub enum Commands {
    Current {
        name: bool,
        email: bool,
        signingkey: bool,
        profile: bool,
        profile_key: bool,
        system: bool,
        global: bool,
        local: bool,
        worktree: bool,
        file: Option<String>,
    },
    List {
        system: bool,
        global: bool,
        local: bool,
        worktree: bool,
        file: Option<String>,
    },
    Show {
        profile_key: String,
    },
    New,
    Edit {
        profile_key: Option<String>,
    },
    Remove {
        profile_key: String,
    },
    Rename {
        old: String,
        new: String,
    },
    Apply {
        profile_key: String,
        system: bool,
        global: bool,
        local: bool,
        worktree: bool,
        file: Option<String>,
    },
    Import {
        system: bool,
        global: bool,
        local: bool,
        worktree: bool,
        file: Option<String>,
    },
    ConfigDump,
    ConfigPath,
}

Variants

Current

Fields

name: bool

Show user.name of the current profile

email: bool

Show user.email of the current profile

signingkey: bool

Show user.signingkey of the current profile if any

profile: bool

Show the current profile

profile_key: bool

Show the name of the current profile (default)

system: bool

Read only from system-wide $(prefix)/etc/gitconfig rather than from all available files.

global: bool

Read only from ~/.gitconfig and from $XDG_CONFIG_HOME/git/config rather than from all available files.

local: bool

Read only from the repository .git/config rather than from all available files.

worktree: bool

Similar to --local except that $GIT_DIR/config.worktree is read from if extensions.worktreeConfig is enabled. If not it’s the same as --local.

file: Option<String>

Read only from the specified file rather than from all available files.

Show the key or value of the current profile

List

Fields

system: bool

Read only from system-wide $(prefix)/etc/gitconfig rather than from all available files.

global: bool

Read only from ~/.gitconfig and from $XDG_CONFIG_HOME/git/config rather than from all available files.

local: bool

Read only from the repository .git/config rather than from all available files.

worktree: bool

Similar to --local except that $GIT_DIR/config.worktree is read from if extensions.worktreeConfig is enabled. If not it’s the same as --local.

file: Option<String>

Read only from the specified file rather than from all available files.

List all profiles

Show

Fields

profile_key: String

Show the details of the given profile

New

Create a new profile

Edit

Fields

profile_key: Option<String>

Edit an existing profile

Remove

Fields

profile_key: String

Remove a profile

Rename

Fields

old: String

Old profile key

new: String

New profile key

Rename the given profile with the given new name

Apply

Fields

profile_key: String
system: bool

Read only from system-wide $(prefix)/etc/gitconfig rather than from all available files.

global: bool

Read only from ~/.gitconfig and from $XDG_CONFIG_HOME/git/config rather than from all available files.

local: bool

Read only from the repository .git/config rather than from all available files.

worktree: bool

Similar to --local except that $GIT_DIR/config.worktree is read from if extensions.worktreeConfig is enabled. If not it’s the same as --local.

file: Option<String>

Read only from the specified file rather than from all available files.

Apply the given profile

Import

Fields

system: bool

Read only from system-wide $(prefix)/etc/gitconfig rather than from all available files.

global: bool

Read only from ~/.gitconfig and from $XDG_CONFIG_HOME/git/config rather than from all available files.

local: bool

Read only from the repository .git/config rather than from all available files.

worktree: bool

Similar to --local except that $GIT_DIR/config.worktree is read from if extensions.worktreeConfig is enabled. If not it’s the same as --local.

file: Option<String>

Read only from the specified file rather than from all available files.

Import the current git config values as a profile

ConfigDump

Dump the content of the config file

ConfigPath

Print path to the config file

Trait Implementations

Formats the value using the given formatter. Read more

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more

Assign values from ArgMatches to self.

Assign values from ArgMatches to self.

Append to Command so it can instantiate Self. Read more

Append to Command so it can update self. Read more

Test whether Self can parse a specific subcommand

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 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.