aboutsummaryrefslogtreecommitdiff
path: root/mingling/src/setups.rs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-08-15 06:07:25 +0800
committer魏曹先生 <1992414357@qq.com>2026-08-15 06:07:25 +0800
commitd175e9fee6ab1f76042280f22a86e5764863c642 (patch)
tree3d965bbc10c2049faa2d9d97ddb282940d781277 /mingling/src/setups.rs
parent57e20f69efea609d8332cc39d223f4aa46be3c78 (diff)
feat(res): add Confirmer resource and stdin args setup
Add Confirmer with cached confirmation state and predicate-based parsing for yes/no and true/false inputs. Add ConfirmerSetup to register the resource and auto-confirm when skip mode is enabled. Add StandardInputArgsSetup to read piped stdin as appended arguments. Reorganize module exports in res and setups.
Diffstat (limited to 'mingling/src/setups.rs')
-rw-r--r--mingling/src/setups.rs31
1 files changed, 17 insertions, 14 deletions
diff --git a/mingling/src/setups.rs b/mingling/src/setups.rs
index 3a3f13d..b2af90c 100644
--- a/mingling/src/setups.rs
+++ b/mingling/src/setups.rs
@@ -1,28 +1,31 @@
-// Doc Not Optimize
+/// Picker's `ProgramSetup` variant.
+///
+/// Internally does not use its own argument parsing,
+/// but relies on `arg_picker`'s argument parsing capability.
+#[cfg(feature = "picker")]
+pub mod picker;
+
mod basic;
pub use basic::*;
+mod confirmer;
+pub use confirmer::*;
+
mod dirs;
pub use dirs::*;
mod exit_code;
pub use exit_code::*;
-/// Picker's `ProgramSetup` variant.
-///
-/// Internally does not use its own argument parsing,
-/// but relies on `arg_picker`'s argument parsing capability.
-#[cfg(feature = "picker")]
-pub mod picker;
+#[cfg(feature = "repl")]
+mod repl_basic;
+#[cfg(feature = "repl")]
+pub use repl_basic::*;
+
+mod stdin_args;
+pub use stdin_args::*;
#[cfg(feature = "structural_renderer")]
mod structural_renderer;
-
#[cfg(feature = "structural_renderer")]
pub use structural_renderer::*;
-
-#[cfg(feature = "repl")]
-mod repl_basic;
-
-#[cfg(feature = "repl")]
-pub use repl_basic::*;