hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/gils/cat.rv
diff options
context:
space:
mode:
Diffstat (limited to 'gils/cat.rv')
-rw-r--r--gils/cat.rv10
1 files changed, 10 insertions, 0 deletions
diff --git a/gils/cat.rv b/gils/cat.rv
new file mode 100644
index 0000000..1cca54b
--- /dev/null
+++ b/gils/cat.rv
@@ -0,0 +1,10 @@
+# meow
+
+const context = env.ctx
+const parsed = arg_name(context.rest, 0)
+if parsed.name:len() == 0 do puts("usage: cat <path>\n") end
+else do
+ const path = abspath(parsed.name)
+ if vfs_owns(path) do vfs_cat(path) end
+ else do fs:cat(path) end
+end