From 945ac43982fdd6e49f3cee5334e20a5df8dd8382 Mon Sep 17 00:00:00 2001 From: Tristan Riehs Date: Sat, 3 Feb 2024 18:14:20 +0100 Subject: help message formatted better --- rpt.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/rpt.c b/rpt.c index 392e442..c31719a 100644 --- a/rpt.c +++ b/rpt.c @@ -29,18 +29,19 @@ int clone_fd; void print_usage(FILE *output) { - fprintf(output, "Usage:\n"); - fprintf(output, "rpt [-n | --count COUNT] [-f | --force] COMMAND\n"); - fprintf(output, "rpt [-h | --help]\n"); - fprintf(output, "rpt [-V | --version]\n"); + fprintf(output, "Usage: rpt [OPTIONS] COMMAND\n"); } void print_help() { - puts("Repeat : repeat a shell command"); - puts(""); + printf("Repeat: repeat a shell command\n"); print_usage(stdout); + printf("OPTIONS:\n"); + printf(" -n COUNT\tRepeat COMMAND COUNT times.\n"); + printf(" -f\t\tDo not exit if one process fails.\n"); + printf(" -h\t\tPrint this message and exit.\n"); + printf(" -v\t\tPrint the version number and exit.\n"); } void -- cgit v1.2.3