| 84 | } |
| 85 | |
| 86 | static bool help_for_command (const char* command, std::ostream& out) |
| 87 | { |
| 88 | if (std::strcmp(command, "init") == 0) { |
| 89 | help_init(out); |
| 90 | } else if (std::strcmp(command, "unlock") == 0) { |
| 91 | help_unlock(out); |
| 92 | } else if (std::strcmp(command, "lock") == 0) { |
| 93 | help_lock(out); |
| 94 | } else if (std::strcmp(command, "add-gpg-user") == 0) { |
| 95 | help_add_gpg_user(out); |
| 96 | } else if (std::strcmp(command, "rm-gpg-user") == 0) { |
| 97 | help_rm_gpg_user(out); |
| 98 | } else if (std::strcmp(command, "ls-gpg-users") == 0) { |
| 99 | help_ls_gpg_users(out); |
| 100 | } else if (std::strcmp(command, "export-key") == 0) { |
| 101 | help_export_key(out); |
| 102 | } else if (std::strcmp(command, "keygen") == 0) { |
| 103 | help_keygen(out); |
| 104 | } else if (std::strcmp(command, "migrate-key") == 0) { |
| 105 | help_migrate_key(out); |
| 106 | } else if (std::strcmp(command, "refresh") == 0) { |
| 107 | help_refresh(out); |
| 108 | } else if (std::strcmp(command, "status") == 0) { |
| 109 | help_status(out); |
| 110 | } else { |
| 111 | return false; |
| 112 | } |
| 113 | return true; |
| 114 | } |
| 115 | |
| 116 | static int help (int argc, const char** argv) |
| 117 | { |
no test coverage detected