diff options
Diffstat (limited to '')
-rw-r--r-- | src/commands/yes.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/commands/yes.c b/src/commands/yes.c index c954810..39cf75d 100644 --- a/src/commands/yes.c +++ b/src/commands/yes.c @@ -1,19 +1,18 @@ #include "../command.h" -static void help() { +static void help(void) { printf("Usage: yes [STRING]\n\n"); printf("Repeatedly output a line with all specified STRING(s), or 'y'.\n"); - exit(EXIT_SUCCESS); } COMMAND(yes) { + + parse_help(argc, argv, help); + const char* repeat; if (argc == 0) { repeat = "y"; } else { - if (streql("--help", argv[0])) { - help(); - } repeat = argv[0]; for (int i = 1; i < argc; i++) { *(argv[i]-1) = ' '; |