diff options
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 |
