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/mv.rv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gils/mv.rv') diff --git a/gils/mv.rv b/gils/mv.rv index d3ecf47..b44995b 100644 --- a/gils/mv.rv +++ b/gils/mv.rv @@ -1,12 +1,12 @@ # move or rename a file const context = env.ctx -if context.argv:len() < 3 do puts("usage: mv \n") end +if context.argv:len() < 3 do fail("usage: mv \n") end else do const source = expand_path(context.argv[1]) const destination = expand_path(context.argv[2]) const size = fs:size(source) - if size < 0 do puts("mv: #{source}: no such file\n") end + if size < 0 do fail("mv: #{source}: no such file\n") end else do const contents = if size > 0 fs:read_bytes(source, 0, size) else "" if fs:store(destination, contents) == 1 do fs:unlink(source) puts("#{source} -> #{destination}\n") end -- cgit v1.3