in focus/commands/src/cli/main.rs [256:334]
fn feature_name_for(subcommand: &Subcommand) -> String {
match subcommand {
Subcommand::New { .. } | Subcommand::Clone { .. } => "new".to_string(),
Subcommand::Sync { .. } => "sync".to_string(),
Subcommand::Repo { subcommand } => match subcommand {
RepoSubcommand::List { .. } => "repo-list".to_string(),
RepoSubcommand::Repair { .. } => "repo-repair".to_string(),
RepoSubcommand::Register { .. } => "repo-register".to_string(),
},
Subcommand::Add { .. } => "add".to_string(),
Subcommand::Remove { .. } => "remove".to_string(),
Subcommand::Status { .. } => "status".to_string(),
Subcommand::Projects { .. } => "projects".to_string(),
Subcommand::Project { subcommand } => match subcommand {
ProjectSubcommand::Lint { .. } => "project-lint".to_string(),
},
Subcommand::DetectBuildGraphChanges { .. } => "detect-build-graph-changes".to_string(),
Subcommand::Refs { subcommand, .. } => match subcommand {
RefsSubcommand::Delete { .. } => "refs-delete".to_string(),
RefsSubcommand::ListExpired { .. } => "refs-list-expired".to_string(),
RefsSubcommand::ListCurrent { .. } => "refs-list-current".to_string(),
},
Subcommand::Branch { subcommand, .. } => match subcommand {
BranchSubcommand::List { .. } => "branch-list".to_string(),
BranchSubcommand::Search { .. } => "branch-search".to_string(),
BranchSubcommand::Add { .. } => "branch-add".to_string(),
},
Subcommand::Maintenance { subcommand, .. } => match subcommand {
MaintenanceSubcommand::Run { .. } => "maintenance-run".to_string(),
MaintenanceSubcommand::Register { .. } => "maintenance-register".to_string(),
MaintenanceSubcommand::SetDefaultConfig { .. } => {
"maintenance-set-default-config".to_string()
}
MaintenanceSubcommand::SandboxCleanup { .. } => {
"maintenance-sandbox-cleanup".to_string()
}
MaintenanceSubcommand::Schedule { subcommand } => match subcommand {
MaintenanceScheduleSubcommand::Enable { .. } => {
"maintenance-schedule-enable".to_string()
}
MaintenanceScheduleSubcommand::Disable { .. } => {
"maintenance-schedule-disable".to_string()
}
},
},
Subcommand::GitTrace { .. } => "git-trace".to_string(),
Subcommand::Upgrade { .. } => "upgrade".to_string(),
Subcommand::Index { subcommand } => match subcommand {
IndexSubcommand::Clear { .. } => "index-clear".to_string(),
IndexSubcommand::CalculateChurn { .. } => "index-calculate-churn".to_string(),
IndexSubcommand::Fetch { .. } => "index-fetch".to_string(),
IndexSubcommand::Get { .. } => "index-get".to_string(),
IndexSubcommand::Generate { .. } => "index-generate".to_string(),
IndexSubcommand::Hash { .. } => "index-hash".to_string(),
IndexSubcommand::Push { .. } => "index-push".to_string(),
IndexSubcommand::Resolve { .. } => "index-resolve".to_string(),
},
Subcommand::ProjectCache { subcommand } => match subcommand {
ProjectCacheSubcommand::Push { .. } => "project-cache-push".to_string(),
},
Subcommand::Event { args } => {
let mut temp_args = args.to_owned();
temp_args.insert(0, "event".to_string());
temp_args.join("-")
}
Subcommand::Version => "version".to_string(),
Subcommand::Background { subcommand } => match subcommand {
BackgroundSubcommand::Enable { .. } => "background-enable".to_string(),
BackgroundSubcommand::Disable { .. } => "background-disable".to_string(),
BackgroundSubcommand::Sync { .. } => "background-sync".to_string(),
},
Subcommand::Pull => "pull".to_string(),
Subcommand::Selection { subcommand } => match subcommand {
SelectionSubcommand::Save { .. } => "selection-save".to_string(),
},
Subcommand::On { .. } => "filter-on".to_string(),
Subcommand::Off {} => "filter-off".to_string(),
}
}