changes the usage output to not include the full contents of argv[0]

This commit is contained in:
Sven Wick 2021-09-02 22:08:33 +02:00
parent 9561b23652
commit 276de8b68e

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) {