commit 93c23879dc64d8291320b28235d3a5e45b773173
parent cd47ebf8e8ced89b6310c1463a6a178dae8e8e66
Author: thing1 <thing1@seacrossedlovers.xyz>
Date: Wed, 25 Feb 2026 09:57:26 +0000
provides posative messages now
Diffstat:
3 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
@@ -7,7 +7,7 @@ DESTDIR=
PREFIX=/usr/local
BINDIR=$(PREFIX)/bin
-all: bin/ls bin/rainbow bin/cat bin/uniq bin/split bin/wc
+all: bin/ls bin/rainbow bin/cat bin/uniq bin/split bin/wc bin/yes
clean:
rm -rf bin/*
@@ -32,3 +32,6 @@ bin/split: cmd/split.ha
bin/wc: cmd/wc.ha
$(HARE) build $(HAREFLAGS) -o $@ cmd/wc.ha
+bin/yes: cmd/yes.ha
+ $(HARE) build $(HAREFLAGS) -o $@ cmd/yes.ha
+
diff --git a/TODO.md b/TODO.md
@@ -1,4 +1,3 @@
-- yes
- fmt
- build system
- shell
diff --git a/cmd/yes.ha b/cmd/yes.ha
@@ -0,0 +1,24 @@
+use fmt;
+use getopt;
+use os;
+
+use util;
+
+export fn main() void = {
+ const cmd = getopt::parse(os::args,
+ "Posative affirmation",
+ ('m', "msg", "Affirmation to be said")
+ );
+
+ let msg = "y";
+
+ for (let opt .. cmd.opts) {
+ switch (opt.0) {
+ case 'm' => msg = opt.1;
+ case => abort();
+ };
+ };
+
+ for (true)
+ fmt::println(msg)!;
+};