Enum gitprofile::Commands
source · [−]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: boolShow user.name of the current profile
email: boolShow user.email of the current profile
signingkey: boolShow user.signingkey of the current profile if any
profile: boolShow the current profile
profile_key: boolShow the name of the current profile (default)
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.
local: boolRead only from the repository .git/config rather than from all available files.
worktree: boolSimilar to --local except that $GIT_DIR/config.worktree is read from if extensions.worktreeConfig is enabled. If not it’s the same as --local.
Show the key or value of the current profile
List
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.
local: boolRead only from the repository .git/config rather than from all available files.
worktree: boolSimilar to --local except that $GIT_DIR/config.worktree is read from if extensions.worktreeConfig is enabled. If not it’s the same as --local.
List all profiles
Show
Fields
profile_key: StringShow the details of the given profile
New
Create a new profile
Edit
Edit an existing profile
Remove
Fields
profile_key: StringRemove a profile
Rename
Rename the given profile with the given new name
Apply
Fields
profile_key: Stringsystem: 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.
local: boolRead only from the repository .git/config rather than from all available files.
worktree: boolSimilar to --local except that $GIT_DIR/config.worktree is read from if extensions.worktreeConfig is enabled. If not it’s the same as --local.
Apply the given profile
Import
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.
local: boolRead only from the repository .git/config rather than from all available files.
worktree: boolSimilar to --local except that $GIT_DIR/config.worktree is read from if extensions.worktreeConfig is enabled. If not it’s the same as --local.
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
sourceimpl FromArgMatches for Commands
impl FromArgMatches for Commands
sourcefn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
sourcefn 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>
Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
sourcefn 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>
Assign values from ArgMatches to self.
sourcefn 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>
Assign values from ArgMatches to self.
sourceimpl Subcommand for Commands
impl Subcommand for Commands
sourcefn augment_subcommands<'b>(__clap_app: Command<'b>) -> Command<'b>
fn augment_subcommands<'b>(__clap_app: Command<'b>) -> Command<'b>
sourcefn augment_subcommands_for_update<'b>(__clap_app: Command<'b>) -> Command<'b>
fn augment_subcommands_for_update<'b>(__clap_app: Command<'b>) -> Command<'b>
sourcefn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Test whether Self can parse a specific subcommand
Auto Trait Implementations
impl RefUnwindSafe for Commands
impl Send for Commands
impl Sync for Commands
impl Unpin for Commands
impl UnwindSafe for Commands
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more