summaryrefslogtreecommitdiff
path: root/src/commands/yes.c
diff options
context:
space:
mode:
authorTyler Murphy <tylerm@tylerm.dev>2023-05-06 00:39:44 -0400
committerTyler Murphy <tylerm@tylerm.dev>2023-05-06 00:39:44 -0400
commitd8f2c10b7108fff6b7e437291093a1cadc15ab9f (patch)
tree3fc50a19d6fbb9c94a8fe147cd2a6c4ba7f59b8d /src/commands/yes.c
parentansii c (diff)
downloadlazysphere-d8f2c10b7108fff6b7e437291093a1cadc15ab9f.tar.gz
lazysphere-d8f2c10b7108fff6b7e437291093a1cadc15ab9f.tar.bz2
lazysphere-d8f2c10b7108fff6b7e437291093a1cadc15ab9f.zip
refactor
Diffstat (limited to 'src/commands/yes.c')
-rw-r--r--src/commands/yes.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/commands/yes.c b/src/commands/yes.c
deleted file mode 100644
index 6a44789..0000000
--- a/src/commands/yes.c
+++ /dev/null
@@ -1,26 +0,0 @@
-#include "../command.h"
-
-static void help(void) {
- printf("Usage: yes [STRING]\n\n");
- printf("Repeatedly output a line with all specified STRING(s), or 'y'.\n");
-}
-
-COMMAND(yes) {
- const char* repeat;
- int i;
-
- parse_help(argc, argv, help);
-
- if (argc == 0) {
- repeat = "y";
- } else {
- repeat = argv[0];
- for (i = 1; i < argc; i++) {
- *(argv[i]-1) = ' ';
- }
- }
-
- while (true) {
- printf("%s\n", repeat);
- }
-}