diff options
Diffstat (limited to 'mingling_core/src/program/config.rs')
| -rw-r--r-- | mingling_core/src/program/config.rs | 64 |
1 files changed, 61 insertions, 3 deletions
diff --git a/mingling_core/src/program/config.rs b/mingling_core/src/program/config.rs index 5c104ab..42603a5 100644 --- a/mingling_core/src/program/config.rs +++ b/mingling_core/src/program/config.rs @@ -10,6 +10,33 @@ pub struct ProgramStdoutSetting { /// Silence panic messages pub silence_panic: bool, + /// Verbose output: provide detailed information + /// + /// **NOTE**: Convention only, not a configuration + pub verbose: bool, + + /// Quiet mode: suppress status messages, show only errors and results + /// + /// **NOTE**: Convention only, not a configuration + pub quiet: bool, + + /// Debug mode: output internal state and detailed diagnostics + /// + /// **NOTE**: Convention only, not a configuration + pub debug: bool, + + /// Enable colored output + /// + /// **NOTE**: Convention only, not a configuration + pub color: bool, + + /// Show progress indicators (e.g. progress bars, spinners) + /// + /// Automatically disabled when stdout is not a tty. + /// + /// **NOTE**: Convention only, not a configuration + pub progress: bool, + #[cfg(feature = "clap")] /// Behavior when Clap Dispatcher outputs help information pub clap_help_print_behaviour: ClapHelpPrintBehaviour, @@ -32,6 +59,11 @@ impl Default for ProgramStdoutSetting { error_output: true, render_output: true, silence_panic: false, + verbose: false, + quiet: false, + debug: false, + color: true, + progress: true, #[cfg(feature = "clap")] clap_help_print_behaviour: ClapHelpPrintBehaviour::default(), } @@ -44,19 +76,45 @@ pub struct ProgramUserContext { /// View help information instead of running the command pub help: bool, + /// Execute hooks during the program lifecycle + pub run_hook: bool, + /// Skip user confirmation step + /// + /// **NOTE**: Convention only, not a configuration pub confirm: bool, - /// Execute hooks during the program lifecycle - pub run_hook: bool, + /// Dry-run mode: simulate actions without making changes + /// + /// **NOTE**: Convention only, not a configuration + pub dry_run: bool, + + /// Force execution, skipping safety checks + /// + /// **NOTE**: Convention only, not a configuration + pub force: bool, + + /// Whether the program is running in an interactive terminal (has a tty) + /// + /// **NOTE**: Convention only, not a configuration + pub interactive: bool, + + /// Assume "yes" for all confirmation prompts + /// + /// **NOTE**: Convention only, not a configuration + pub assume_yes: bool, } impl Default for ProgramUserContext { fn default() -> Self { Self { help: false, - confirm: false, run_hook: true, + confirm: false, + dry_run: false, + force: false, + interactive: false, + assume_yes: false, } } } |
