From fcebac5606bb043b1fd35bfee9e4ac910c804aed Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Tue, 27 Aug 2024 00:02:18 +0200 Subject: Open the manual page with -h/--help --- src/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 545d05d..9968d6e 100644 --- a/src/main.c +++ b/src/main.c @@ -10,6 +10,7 @@ #include #include #include +#include #include "base32.h" #include "common.h" @@ -51,9 +52,7 @@ main(int argc, char **argv) while ((opt = getopt_long(argc, argv, "d:hp:", longopts, NULL)) != -1) { switch (opt) { case 'h': - /* TODO: Open the manual page! */ - usage(argv[0]); - break; + execlp("man", "man", "1", argv[0], NULL); case 'd': case 'p': { /* strtol() allows for numbers with leading spaces and a -- cgit v1.2.3