diff options
| author | Thomas Voss <mail@thomasvoss.com> | 2024-08-27 00:02:18 +0200 | 
|---|---|---|
| committer | Thomas Voss <mail@thomasvoss.com> | 2024-08-27 00:02:18 +0200 | 
| commit | fcebac5606bb043b1fd35bfee9e4ac910c804aed (patch) | |
| tree | 522aa0d896b88cb643c3d573fd98c51fb87b6183 /src | |
| parent | df8a77427a76ca84770a89cf5f4b042a7b944107 (diff) | |
Open the manual page with -h/--help
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.c | 5 | 
1 files changed, 2 insertions, 3 deletions
| @@ -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 |