commit 0a58e7222f591acd7479040f317f1e0e0e9d132e from: Omar Polo via: Thomas Adam date: Tue Oct 04 11:03:07 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 - cfab1835584d3f69e858d421c192731cef8848d4 commit + 0a58e7222f591acd7479040f317f1e0e0e9d132e 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 - f95acae454f160625ff566ed5baf5f71728d82d0 blob + 62dff7f48f344b706d7defa986de0ca7d8d53de2 --- 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 - 090912b3a25aa942fcc2e2cf9d66fb6b7234bd4f blob + 628bc5f3b393667e74b1a210a0767b2ee2b4b4c7 --- 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 - a6af268d74c79bc45c6aaddce6f5bcd8eeae8f15 blob + 7b6cb78dc900d842271ade00295c3ea1b95dbb8f --- tog/tog.c +++ tog/tog.c @@ -9137,7 +9137,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());