aboutsummaryrefslogtreecommitdiff
path: root/docs/dev-docs/pages/issues/the-shit-time.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/dev-docs/pages/issues/the-shit-time.md')
-rw-r--r--docs/dev-docs/pages/issues/the-shit-time.md14
1 files changed, 7 insertions, 7 deletions
diff --git a/docs/dev-docs/pages/issues/the-shit-time.md b/docs/dev-docs/pages/issues/the-shit-time.md
index 77a8af9..f524f42 100644
--- a/docs/dev-docs/pages/issues/the-shit-time.md
+++ b/docs/dev-docs/pages/issues/the-shit-time.md
@@ -23,7 +23,7 @@ completion:
--help -h --- Display helps
--version -V --- Display versions
```
-
+
Currently, there is no workaround.
Ideal solution:
@@ -34,7 +34,7 @@ fn complete(ctx: &ShellContext) -> Suggest {
// ...
}
```
-
+
---
## Why can't I register descriptions for commands?
@@ -50,7 +50,7 @@ mycmd <tab>
completion:
add rm list <--- You cannot register descriptions for commands
```
-
+
Expected behavior:
```
@@ -60,7 +60,7 @@ add --- Add something
rm --- Remove something
list --- List something
```
-
+
Ideal solution:
```rust
@@ -70,11 +70,11 @@ 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)]
@@ -82,7 +82,7 @@ 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