aboutsummaryrefslogtreecommitdiff
path: root/docs/dev/pages/issues/the-shit-time.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/dev/pages/issues/the-shit-time.md')
-rw-r--r--docs/dev/pages/issues/the-shit-time.md13
1 files changed, 12 insertions, 1 deletions
diff --git a/docs/dev/pages/issues/the-shit-time.md b/docs/dev/pages/issues/the-shit-time.md
index 9d6c429..ece670e 100644
--- a/docs/dev/pages/issues/the-shit-time.md
+++ b/docs/dev/pages/issues/the-shit-time.md
@@ -9,7 +9,7 @@ Of course, you can also contribute to this document.
---
-## Why is there no fallback completion logic?
+## Why is there no fallback completion logic? (Solved)
(completion) (fallback)
@@ -35,6 +35,17 @@ fn complete(ctx: &ShellContext) -> Suggest {
}
```
+Final implementation:
+
+By adding support for `EntryFallback` (formerly `ErrorDispatcherNotFound`) to the Completion system, `EntryFallback` can now be used as a completion entry point when no subcommand is matched:
+
+```rust
+#[completion(EntryFallback)]
+fn complete_fallback(_ctx: &ShellContext) -> Suggest {
+ suggest! { "fallback" }
+}
+```
+
---
## Why can't I register descriptions for commands?