cinera.c: Mention the default config path in -h

This commit is contained in:
Matt Mascarenhas 2020-05-09 22:27:40 +01:00
parent bd8c6b805d
commit 3728c8aaee
1 changed files with 7 additions and 6 deletions

View File

@ -17,7 +17,7 @@ typedef struct
version CINERA_APP_VERSION = { version CINERA_APP_VERSION = {
.Major = 0, .Major = 0,
.Minor = 7, .Minor = 7,
.Patch = 1 .Patch = 2
}; };
#include <stdarg.h> // NOTE(matt): varargs #include <stdarg.h> // NOTE(matt): varargs
@ -7023,7 +7023,7 @@ enable syntax highlighting:"));
} }
void void
PrintHelp(char *BinaryLocation) PrintHelp(char *BinaryLocation, char *DefaultConfigPath)
{ {
// Options // Options
fprintf(stderr, fprintf(stderr,
@ -7031,7 +7031,8 @@ PrintHelp(char *BinaryLocation)
"\n" "\n"
"Options:\n" "Options:\n"
" -c <config file path>\n" " -c <config file path>\n"
" Set the main config file path.\n" " Set the main config file path\n"
" Defaults to: %s\n"
" -0\n" " -0\n"
" Dry-run mode. Parse and print the config, but do not modify the filesystem.\n" " Dry-run mode. Parse and print the config, but do not modify the filesystem.\n"
" -e\n" " -e\n"
@ -7039,7 +7040,7 @@ PrintHelp(char *BinaryLocation)
" -v\n" " -v\n"
" Display version and exit\n" " Display version and exit\n"
" -h\n" " -h\n"
" Display this help\n", BinaryLocation); " Display this help\n", BinaryLocation, DefaultConfigPath);
PrintHelpConfig(); PrintHelpConfig();
} }
@ -15012,7 +15013,7 @@ main(int ArgC, char **Args)
break; break;
case 'h': case 'h':
default: default:
PrintHelp(Args[0]); PrintHelp(Args[0], ConfigPath);
return RC_SUCCESS; return RC_SUCCESS;
} }
} }
@ -15091,7 +15092,7 @@ main(int ArgC, char **Args)
{ {
if(ArgC < 2) if(ArgC < 2)
{ {
PrintHelp(Args[0]); PrintHelp(Args[0], ConfigPath);
} }
else else
{ {