pub struct UserInput {
pub config_ini: Option<String>,
pub reconcile: Vec<PathBuf>,
pub since: Option<String>,
}Expand description
Command-line argument parser for configuration file path.
This struct uses clap to parse CLI arguments and provide configuration
options for the application. Currently supports specifying a custom INI
configuration file path.
§CLI Arguments
--config-ini <PATH>- Optional path to a custom configuration file
§Examples
# Use default config (~/.config/rusty-commit-saver/rusty-commit-saver.ini)
rusty-commit-saver
# Use custom config file
rusty-commit-saver --config-ini /path/to/custom.ini§See Also
retrieve_config_file_path()- Gets the config path from CLI or defaultget_ini_file()- Loads the INI file from the resolved path
Fields§
§config_ini: Option<String>Path to a custom INI configuration file.
If not provided, the default configuration file is used:
~/.config/rusty-commit-saver/rusty-commit-saver.ini
§CLI Usage
rusty-commit-saver --config-ini /custom/path/config.ini§Examples
Valid paths:
~/my-configs/commit-saver.ini/etc/rusty-commit-saver/config.ini./local-config.ini
reconcile: Vec<PathBuf>Reconcile these repositories against their day notes, instead of journalling the commit that just happened.
Repeatable. Each value is a path inside a git repository; the
repository is discovered from it the same way the hook discovers its
own, and the history walked is what that checkout’s HEAD can reach.
Given at least once, the binary does not journal the repository it was
started in and does not behave as a hook at all.
§CLI Usage
rusty-commit-saver --reconcile ~/src/one --reconcile ~/src/twosince: Option<String>Ignore commits older than this date when reconciling, as YYYY-MM-DD.
Without it every commit reachable from HEAD is considered, which is
what a first backfill wants and what a nightly pass does not.
§CLI Usage
rusty-commit-saver --reconcile ~/src/one --since 2026-08-01Trait Implementations§
Source§impl Args for UserInput
impl Args for UserInput
Source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
ArgGroup::id][crate::ArgGroup::id] for this set of argumentsSource§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§impl FromArgMatches for UserInput
impl FromArgMatches for UserInput
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(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.