commit 6a0a1bd407b4d06a6d003428daaa50cc2d92c6f9 from: Omar Polo date: Tue Oct 04 10:57:22 2022 UTC sync usage with reality The -h and -V/--version flags must be given before the command; with those flags the command is actually optional, but don't over-complicate the usage string with these nitpicks. ok/improvements stsp@ commit - 47b307cd821b00964d3c5aea35c86689df2fe26d commit + 6a0a1bd407b4d06a6d003428daaa50cc2d92c6f9 blob - 3c54a78702c5a0acbe54c9948029dcd3ebba2ccc blob + 7aaa7e057f73895b5da6fc8f9f74a6dc5e45b4c3 --- got/got.1 +++ got/got.1 @@ -22,8 +22,8 @@ .Nd Game of Trees .Sh SYNOPSIS .Nm +.Op Fl hV .Ar command -.Op Fl h .Op Ar arg ... .Sh DESCRIPTION .Nm blob - 2fe9e120a0bace5a7b80643b8da00a79f1462de8 blob + 8c67883a29d93bbeabd17757342dce54cba4d67e --- got/got.c +++ got/got.c @@ -281,7 +281,7 @@ usage(int hflag, int status) { FILE *fp = (status == 0) ? stdout : stderr; - fprintf(fp, "usage: %s [-h] [-V | --version] command [arg ...]\n", + fprintf(fp, "usage: %s [-hV] command [arg ...]\n", getprogname()); if (hflag) list_commands(fp); blob - c633b3177963aca3fa00f1a3474129c3b4441c1b blob + e11b3a0b3586e7aac0c6955aac2096e7dc6d7fe6 --- gotadmin/gotadmin.1 +++ gotadmin/gotadmin.1 @@ -21,8 +21,8 @@ .Nd Game of Trees repository administration .Sh SYNOPSIS .Nm +.Op Fl hV .Ar command -.Op Fl h .Op Ar arg ... .Sh DESCRIPTION .Nm blob - 075ff5086825e3041fdc58673e8adca7e6016635 blob + e52fbe0e7a683a76482f59effaf3fc58cfcaf0d6 --- gotadmin/gotadmin.c +++ gotadmin/gotadmin.c @@ -195,7 +195,7 @@ usage(int hflag, int status) { FILE *fp = (status == 0) ? stdout : stderr; - fprintf(fp, "usage: %s [-h] [-V | --version] command [arg ...]\n", + fprintf(fp, "usage: %s [-hV] command [arg ...]\n", getprogname()); if (hflag) list_commands(fp); blob - c3488dc79dfbff68596199641118d5f73ffdc650 blob + 4002e60af933403d74d88f068b7af00699e0fe2d --- tog/tog.1 +++ tog/tog.1 @@ -21,8 +21,8 @@ .Nd Git repository browser .Sh SYNOPSIS .Nm -.Op Ar command -.Op Fl h +.Op Fl hV +.Ar command .Op Ar arg ... .Pp .Nm blob - 9342533704886cb6d5da04a9e2323e418557f8a8 blob + d326fe7596a743dfd15243b75371bab5fd61911e --- tog/tog.c +++ tog/tog.c @@ -9132,7 +9132,7 @@ usage(int hflag, int status) { FILE *fp = (status == 0) ? stdout : stderr; - fprintf(fp, "usage: %s [-h] [-V | --version] [command] [arg ...]\n", + fprintf(fp, "usage: %s [-hV] command [arg ...]\n", getprogname()); if (hflag) { fprintf(fp, "lazy usage: %s path\n", getprogname());