From abbabd9c55daa79b07cd9ba81037568958794a91 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Fri, 10 Jul 2026 16:23:18 +0800 Subject: chore(docs): rename dev-docs directory to dev Update sidebar link for remove-r-print-macro to use full description --- docs/dev-docs/pages/issues/the-shit-time.md | 90 ----------------------------- 1 file changed, 90 deletions(-) delete mode 100644 docs/dev-docs/pages/issues/the-shit-time.md (limited to 'docs/dev-docs/pages/issues/the-shit-time.md') diff --git a/docs/dev-docs/pages/issues/the-shit-time.md b/docs/dev-docs/pages/issues/the-shit-time.md deleted file mode 100644 index f524f42..0000000 --- a/docs/dev-docs/pages/issues/the-shit-time.md +++ /dev/null @@ -1,90 +0,0 @@ -

Some Situations Where You'd Be Like "Shit!"

-

- This document collects the discomforts currently experienced while using Mingling. -

- -This document collects the discomforts currently experienced while using Mingling. - -Of course, you can also contribute to this document. - ---- - -## Why is there no fallback completion logic? - -(completion) (fallback) - -Currently, Mingling's Completion only supports providing completion logic for specific subcommands, with no way to provide global completion. - -For example: - -``` -mycmd -completion: ---help -h --- Display helps ---version -V --- Display versions -``` - -Currently, there is no workaround. - -Ideal solution: - -```rust -#[completion(EntryGlobal)] -fn complete(ctx: &ShellContext) -> Suggest { - // ... -} -``` - ---- - -## Why can't I register descriptions for commands? - -(completion) (dispatcher) - -Currently, Mingling's Completion cannot register a description for each subcommand. - -For example: - -``` -mycmd -completion: -add rm list <--- You cannot register descriptions for commands -``` - -Expected behavior: - -``` -mycmd -completion: -add --- Add something -rm --- Remove something -list --- List something -``` - -Ideal solution: - -```rust -// It should be able to freely integrate with crates that provide i18n functionality, -// so the following approach cannot be used as a data source for descriptions. -dispatcher! { - /// Add Something <--- How to i18n? - "add", CMDAdd => EntryAdd -} - -// Ideally, it should satisfy the following two conditions: -// 1. No need to use `with_dispatcher`, because `with_dispatcher` is disabled in `dispatch_tree` mode -// 2. Must be able to accept String or &str at runtime - -// Current idea -#[inline(always)] -#[dispatcher_desc(EntryAdd)] -fn desc_add() -> String { - // If using rust_i18n - t!("cmd.add.desc") -} - -// Collected and generated by `gen_program!()` -// Generate something like get_dispatcher_desc(id: &ThisProgram) -> String -// Match the corresponding function using enum values inside ThisProgram -gen_program!() -``` -- cgit