Skip to content

Commit 3357e6c

Browse files
committed
fix: codeflare catchall does not fire
Oof, our filter was checking argv[1]===codeflare, instead of argv[0]
1 parent 2a149b0 commit 3357e6c

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

plugins/plugin-codeflare/src/controller/catchall.ts

+3
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,7 @@
1616

1717
import { doMadwizard } from "@kui-shell/plugin-madwizard"
1818

19+
/**
20+
* Our catch-all command handler: send to madwizard.
21+
*/
1922
export default doMadwizard(true, "guide", true)

plugins/plugin-codeflare/src/controller/index.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,13 @@ export default function registerCodeflareCommands(registrar: Registrar) {
5454
height: 600,
5555
})
5656

57+
/**
58+
* Register a catch-all command handler: any `/^codeflare/` command
59+
* lines, send to madwizard.
60+
*/
5761
registrar.catchall<KResponse, MadWizardOptions>(
58-
(argv: string[]) => argv[1] === "codeflare",
62+
(argv: string[]) => argv[0] === "codeflare",
5963
(args) => import("./catchall").then((_) => _.default(args)),
60-
0
64+
1
6165
)
6266
}

0 commit comments

Comments
 (0)