From 4764c3c818e3da16a3cba3b9877d9beb635e4237 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Thu, 9 Apr 2026 15:12:11 +0800 Subject: Add basic completion module with shell integration --- mingling_core/src/asset/comp.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 mingling_core/src/asset/comp.rs (limited to 'mingling_core/src/asset/comp.rs') diff --git a/mingling_core/src/asset/comp.rs b/mingling_core/src/asset/comp.rs new file mode 100644 index 0000000..4815b5a --- /dev/null +++ b/mingling_core/src/asset/comp.rs @@ -0,0 +1,20 @@ +mod flags; +mod shell_ctx; +mod suggest; + +#[doc(hidden)] +pub use flags::*; +#[doc(hidden)] +pub use shell_ctx::*; +#[doc(hidden)] +pub use suggest::*; + +/// Trait for implementing completion logic. +/// +/// This trait defines the interface for generating command-line completions. +/// Types implementing this trait can provide custom completion suggestions +/// based on the current shell context. +pub trait Completion { + type Previous; + fn comp(ctx: ShellContext) -> Suggest; +} -- cgit