diff options
-rw-r--r-- | midimonster.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/midimonster.c b/midimonster.c index b1eafdf..0b01517 100644 --- a/midimonster.c +++ b/midimonster.c @@ -35,7 +35,14 @@ static void version(){ static int usage(char* fn){ version(); fprintf(stderr, "Usage:\n"); - fprintf(stderr, "\t%s <configfile>\n", fn); + fprintf(stderr, "\t%s [<options>] <configfile>\n", fn); + fprintf(stderr, "\nOptions:\n"); + fprintf(stderr, "\t-v,--version - show version\n"); + fprintf(stderr, "\t-b <backend> - override backend options (can be used multiple times)\n"); + fprintf(stderr, "\t-i <instance> - override instance options (can be used multiple times)\n"); + fprintf(stderr, "\t-h,--help - show this usage info\n"); + fprintf(stderr, "\nInstance/Backend options format:\n"); + fprintf(stderr, "<instance/backend>.<option>=<value>\n"); return EXIT_FAILURE; } @@ -68,6 +75,10 @@ static int args_parse(int argc, char** argv, char** cfg_file){ version(); return 1; } + else if(!strcmp(argv[u], "-h") || !strcmp(argv[u], "--help")){ + usage(argv[0]); + return 1; + } else if(!strcmp(argv[u], "-i")){ if(!argv[u + 1]){ fprintf(stderr, "Missing instance override specification\n"); |