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_survey;
23pub mod ct_test;
24pub mod ct_tree;
25pub mod ct_view;
26
27pub fn commands() -> Vec<(&'static str, clap::Command)> {
31 vec![
32 ("ct-await", ct_await::Cli::command()),
33 ("ct-check", ct_check::Cli::command()),
34 ("ct-each", ct_each::Cli::command()),
35 ("ct-edit", ct_edit::Cli::command()),
36 ("ct-okf", ct_okf::Cli::command()),
37 ("ct-outline", ct_outline::Cli::command()),
38 ("ct-patch", ct_patch::Cli::command()),
39 ("ct-rules", ct_rules::Cli::command()),
40 ("ct-search", ct_search::Cli::command()),
41 ("ct-steer", ct_steer::Cli::command()),
42 ("ct-survey", ct_survey::Cli::command()),
43 ("ct-test", ct_test::Cli::command()),
44 ("ct-tree", ct_tree::Cli::command()),
45 ("ct-view", ct_view::Cli::command()),
46 ]
47}
48
49pub fn grammars() -> Vec<(&'static str, crate::deps::Grammar)> {
53 commands()
54 .into_iter()
55 .map(|(name, command)| (name, crate::deps::grammar(command)))
56 .collect()
57}