From ef104148057ab98f80b1560405b5c02768457096 Mon Sep 17 00:00:00 2001 From: hachem Date: Thu, 8 Oct 2026 11:50:02 +0200 Subject: feat: colors + better ps1 --- gils/wc.rv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gils/wc.rv') diff --git a/gils/wc.rv b/gils/wc.rv index 9a184ca..1127299 100644 --- a/gils/wc.rv +++ b/gils/wc.rv @@ -1,11 +1,11 @@ # word count const context = env.ctx -if context.argv:len() < 2 do puts("usage: wc \n") end +if context.argv:len() < 2 do fail("usage: wc \n") end else do const path = expand_path(context.argv[1]) const size = fs:size(path) - if size < 0 do puts("wc: #{path}: no such file\n") end + if size < 0 do fail("wc: #{path}: no such file\n") end else do const contents = if size > 0 fs:read_bytes(path, 0, size) else "" let line_count = 0 -- cgit v1.3