diff options
| author | hachem <im@hachem.wtf> | 2026-10-09 11:08:09 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-10-09 11:08:09 +0200 |
| commit | e0572c37d970d601c17085bdb082cc6ef4356891 (patch) | |
| tree | f0b4d71c92978e74d127d7090d3e11380378a8b3 /gils/ls.rv | |
| parent | 8cb66100fe802c38d180ea29a11a902decf0fd8b (diff) | |
chore: fmt some revo code based on lung's example
Diffstat (limited to 'gils/ls.rv')
| -rw-r--r-- | gils/ls.rv | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -1,10 +1,15 @@ # list a directory const context = env.ctx -const target = if context.argv:len() > 1 expand_path(context.argv[1]) else wd.path -if vfs_owns(target) do vfs_ls(target) end -else do +const target = if (context.argv:len() > 1) expand_path(context.argv[1]) else wd.path + +if vfs_owns(target) do + vfs_ls(target) +end else do const count = fs:ls(target) - if target == "/" do puts(" proc/\n") end - else if count == 0 do puts(" (empty)\n") end + if target == "/" do + puts(" proc/\n") + end else if count == 0 do + puts(" (empty)\n") + end end |
