From: Johannes Thyssen Tishman Subject: tog: print list of commands on invalid command To: gameoftrees@openbsd.org Date: Wed, 19 Nov 2025 10:18:29 +0000 As per the commit message, this commit makes tog behavior consistent with got's when running 'got -h invalid-cmd'. commit c11685c3bcf6c3d238b53fd7e0ee60d1e948f0ed (main) from: Johannes Thyssen Tishman date: Tue Nov 18 18:19:50 2025 UTC tog: print list of commands on invalid command This makes tog consistent with got's behavior. M tog/tog.c | 6+ 2- 1 file changed, 6 insertions(+), 2 deletions(-) commit - 414e93f1fc65b3df23c8fbaeaa334ffdab1f75b1 commit + c11685c3bcf6c3d238b53fd7e0ee60d1e948f0ed blob - d3ec8991a224394ba68fc8cf5feb7f2fabeae71b blob + 4c1fc3471c49895d43f6f63a0f12edecececdcd2 --- tog/tog.c +++ tog/tog.c @@ -11763,8 +11763,12 @@ main(int argc, char *argv[]) tog_base_commit.marker = GOT_WORKTREE_STATE_UNKNOWN; if (cmd == NULL) { - if (argc != 1) - usage(0, 1); + if (argc > 0) { + fprintf(stderr, "%s: unknown command '%s'\n", + getprogname(), argv[0]); + list_commands(stderr); + exit(1); + } /* No command specified; try log with a path */ error = tog_log_with_path(argc, argv); } else {