1use clap::CommandFactory;
11
12pub mod ct_await;
13pub mod ct_check;
14pub mod ct_each;
15pub mod ct_edit;
16pub mod ct_okf;
17pub mod ct_outline;
18pub mod ct_patch;
19pub mod ct_rules;
20pub mod ct_search;
21pub mod ct_steer;
22pub mod ct_test;
23pub mod ct_tree;
24pub mod ct_view;
25
26pub fn commands() -> Vec<(&'static str, clap::Command)> {
30 vec![
31 ("ct-await", ct_await::Cli::command()),
32 ("ct-check", ct_check::Cli::command()),
33 ("ct-each", ct_each::Cli::command()),
34 ("ct-edit", ct_edit::Cli::command()),
35 ("ct-okf", ct_okf::Cli::command()),
36 ("ct-outline", ct_outline::Cli::command()),
37 ("ct-patch", ct_patch::Cli::command()),
38 ("ct-rules", ct_rules::Cli::command()),
39 ("ct-search", ct_search::Cli::command()),
40 ("ct-steer", ct_steer::Cli::command()),
41 ("ct-test", ct_test::Cli::command()),
42 ("ct-tree", ct_tree::Cli::command()),
43 ("ct-view", ct_view::Cli::command()),
44 ]
45}
46
47pub fn grammars() -> Vec<(&'static str, crate::deps::Grammar)> {
51 commands()
52 .into_iter()
53 .map(|(name, command)| (name, crate::deps::grammar(command)))
54 .collect()
55}