Merge pull request #60 from vaporup/master

change the usage output to not include the full contents of argv[0]
This commit is contained in:
Murilo Pereira 2021-09-03 17:59:35 +02:00 committed by GitHub
commit 9d32aae34f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,6 @@
#include <errno.h>
#include <getopt.h>
#include <libgen.h>
#include <locale.h>
#include <ncurses.h>
#include <stdlib.h>
@ -33,7 +34,7 @@ int main(int argc, char *argv[]) {
{"no-background-color", no_argument, &no_background_color, 1},
{0, 0, 0, 0}};
program_name = argv[0];
program_name = basename(argv[0]);
while ((option = getopt_long(argc, argv, "hvp:", options, &option_index)) !=
-1) {