From b30a6e19cbbd24f5bd29ce18e901fa1379eb0443 Mon Sep 17 00:00:00 2001 From: Lorenzo Cogotti Date: Thu, 15 Dec 2022 19:37:04 +0100 Subject: [PATCH] [examples/ls] Improve comments. --- examples/ls.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/ls.lua b/examples/ls.lua index abd847e..2cf9804 100644 --- a/examples/ls.lua +++ b/examples/ls.lua @@ -11,6 +11,12 @@ -- lua ls.lua -a -h src -- lua ls.lua -a -t a.dir b.dir c.dir -- +-- Supported options: +-- -a list hidden files +-- -t sort by time, most recent first +-- -S sort by size, largest first +-- -h print size next to each file in kilobytes (1024) +-- -- Author: Lorenzo Cogotti, The DoubleFourteen Code Forge local osx = require 'osx' @@ -87,7 +93,7 @@ local function listfilenames(filenames, bufs, total) if hflag then write(ksize(buf.size or 0), " ") end - write(filename, '\n') + write(filename, "\n") end end