summaryrefslogtreecommitdiff
path: root/headers.lua
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2024-08-26 01:55:02 +0200
committerAki <please@ignore.pl>2024-08-26 01:55:02 +0200
commit0778c66917daba1a0dc948eacdf86578ec4dd2be (patch)
tree4abde2008d8d0ee0e846c5fb734b0fe95c048378 /headers.lua
parenta3c88e98886a4dc149b0e55059f8bcdc5d345f18 (diff)
downloadheaders-0778c66917daba1a0dc948eacdf86578ec4dd2be.zip
headers-0778c66917daba1a0dc948eacdf86578ec4dd2be.tar.gz
headers-0778c66917daba1a0dc948eacdf86578ec4dd2be.tar.bz2
User may now ask for multiple standards/tags from the CLI utility
Diffstat (limited to 'headers.lua')
-rwxr-xr-xheaders.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/headers.lua b/headers.lua
index 680142d..290aca3 100755
--- a/headers.lua
+++ b/headers.lua
@@ -1,8 +1,8 @@
#!/usr/bin/env lua
local args = require "pl.lapp" [[
Prints list of headers from a standard or available standards
- -d (string default 'db/') Directory where definitions are placed
- <selection> (optional string) Standard to display headers for
+ -d (string default 'db/') Directory where definitions are placed
+ <selection...> (optional string) Standard to display the headers for
]]
local dir = require "pl.dir"
local parser = require "headers.parser".new()
@@ -13,7 +13,7 @@ for _, filename in pairs(definitions) do
handle:close()
parser:parse(data)
end
-if args.selection then
+if #args.selection > 0 then
local headers = parser:get_headers(args.selection)
if not headers then
os.exit(1)