pub enum ConfigCmd {
Init {
force: bool,
print: bool,
},
Edit {
host: bool,
},
Print {
effective: bool,
origin: bool,
key: Option<String>,
},
Validate,
Set {
key: String,
value: String,
layer: String,
},
Unset {
key: String,
layer: String,
},
Schema {
kind: String,
write: Option<PathBuf>,
},
}Variants§
Init
Write a fully commented config.toml (every option at its default) and the JSON Schemas.
Fields
Edit
Open config.toml (or this host’s override) in $VISUAL / $EDITOR, then validate it.
Print the configuration (merged TOML, or every leaf with –effective).
Fields
Validate
Check every file (config layers, themes, keymap, layouts, rules) with file:line errors.
Set
Set a value with a comment-preserving edit (validated before writing).
Unset
Remove a key from a layer (falls back to lower layers / defaults).
Schema
Print a JSON Schema (config | theme | keymap | layout | rules), or write all with –write.
Trait Implementations§
Source§impl FromArgMatches for ConfigCmd
impl FromArgMatches for ConfigCmd
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>
Assign values from
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>
Assign values from
ArgMatches to self.Source§impl Subcommand for ConfigCmd
impl Subcommand for ConfigCmd
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Append to
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Test whether
Self can parse a specific subcommandAuto Trait Implementations§
impl Forget for ConfigCmd
impl Freeze for ConfigCmd
impl Move for ConfigCmd
impl RefUnwindSafe for ConfigCmd
impl Send for ConfigCmdwhere
RawVecInner: Send,
impl Sync for ConfigCmdwhere
RawVecInner: Sync,
impl Unpin for ConfigCmd
impl UnsafeUnpin for ConfigCmd
impl UnwindSafe for ConfigCmdwhere
RawVecInner: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more