aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-08-27 00:02:18 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-08-27 00:02:18 +0200
commitfcebac5606bb043b1fd35bfee9e4ac910c804aed (patch)
tree522aa0d896b88cb643c3d573fd98c51fb87b6183 /src
parentdf8a77427a76ca84770a89cf5f4b042a7b944107 (diff)
Open the manual page with -h/--help
Diffstat (limited to 'src')
-rw-r--r--src/main.c5
1 files changed, 2 insertions, 3 deletions
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 <stdnoreturn.h>
#include <string.h>
#include <time.h>
+#include <unistd.h>
#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