diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-04-09 15:12:11 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-04-09 15:12:11 +0800 |
| commit | 4764c3c818e3da16a3cba3b9877d9beb635e4237 (patch) | |
| tree | 3adc438ca9b56f0fcd95354af4bd8329640ecce4 /mingling_core/src/asset/comp.rs | |
| parent | 240361b240d638363346013160b0943b47769c37 (diff) | |
Add basic completion module with shell integration
Diffstat (limited to 'mingling_core/src/asset/comp.rs')
| -rw-r--r-- | mingling_core/src/asset/comp.rs | 20 |
1 files changed, 20 insertions, 0 deletions
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; +} |
