mirror of
https://github.com/xHyroM/gimi.git
synced 2024-11-10 02:38:06 +01:00
feat: gimi provider help message
This commit is contained in:
parent
6015636ae7
commit
5a6a2e056b
1 changed files with 13 additions and 0 deletions
|
@ -5,6 +5,14 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#define HELP \
|
||||||
|
"Usage: gimi provider [-h | --help]\n\n" \
|
||||||
|
"Commands for working with gimi provider:\n" \
|
||||||
|
" info Print info about the provider\n" \
|
||||||
|
" sync Synchronize gimi provider with git\n\n" \
|
||||||
|
"Options:\n" \
|
||||||
|
" -h, --help Show this help message and exit\n"
|
||||||
|
|
||||||
int providers() {
|
int providers() {
|
||||||
struct gimi_config *cfg = config_read();
|
struct gimi_config *cfg = config_read();
|
||||||
ASSERT_CONFIG_EXIST(cfg);
|
ASSERT_CONFIG_EXIST(cfg);
|
||||||
|
@ -86,6 +94,11 @@ int cli_command_provider(int argc, char **argv) {
|
||||||
|
|
||||||
char *subcommand = argv[0];
|
char *subcommand = argv[0];
|
||||||
|
|
||||||
|
if (strcmp(argv[0], "--help") == 0 || strcmp(argv[0], "-h") == 0) {
|
||||||
|
printf("%s", HELP);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (strcmp(subcommand, "info") == 0) {
|
if (strcmp(subcommand, "info") == 0) {
|
||||||
return provider_info(argc, argv);
|
return provider_info(argc, argv);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue