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
Show the key or value of the current profile
Fields
system: boolRead only from system-wide $(prefix)/etc/gitconfig rather than from all available files.
global: boolRead only from ~/.gitconfig and from $XDG_CONFIG_HOME/git/config rather than from all available files.
List
List all profiles
Fields
system: boolRead only from system-wide $(prefix)/etc/gitconfig rather than from all available files.
global: boolRead only from ~/.gitconfig and from $XDG_CONFIG_HOME/git/config rather than from all available files.
Show
Show the details of the given profile
New
Create a new profile
Edit
Edit an existing profile
Remove
Remove a profile
Rename
Rename the given profile with the given new name
Apply
Apply the given profile
Fields
system: boolRead only from system-wide $(prefix)/etc/gitconfig rather than from all available files.
global: boolRead only from ~/.gitconfig and from $XDG_CONFIG_HOME/git/config rather than from all available files.
Import
Import the current git config values as a profile
Fields
system: boolRead only from system-wide $(prefix)/etc/gitconfig rather than from all available files.
global: boolRead only from ~/.gitconfig and from $XDG_CONFIG_HOME/git/config rather than from all available files.
ConfigDump
Dump the content of the config file
ConfigPath
Print path to the config file
Trait Implementations§
Source§impl FromArgMatches for Commands
impl FromArgMatches for Commands
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for Commands
impl Subcommand for Commands
Source§fn augment_subcommands<'b>(__clap_app: Command<'b>) -> Command<'b>
fn augment_subcommands<'b>(__clap_app: Command<'b>) -> Command<'b>
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command<'b>) -> Command<'b>
fn augment_subcommands_for_update<'b>(__clap_app: Command<'b>) -> Command<'b>
Source§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommand