texlive[70797] trunk: l3sys-query (28mar24)

commits+karl at tug.org commits+karl at tug.org
Thu Mar 28 21:08:03 CET 2024


Revision: 70797
          https://tug.org/svn/texlive?view=revision&revision=70797
Author:   karl
Date:     2024-03-28 21:08:03 +0100 (Thu, 28 Mar 2024)
Log Message:
-----------
l3sys-query (28mar24)

Modified Paths:
--------------
    trunk/Build/source/texk/texlive/linked_scripts/l3sys-query/l3sys-query.lua
    trunk/Master/texmf-dist/doc/man/man1/l3sys-query.1
    trunk/Master/texmf-dist/doc/man/man1/l3sys-query.man1.pdf
    trunk/Master/texmf-dist/doc/support/l3sys-query/CHANGELOG.md
    trunk/Master/texmf-dist/doc/support/l3sys-query/README.md
    trunk/Master/texmf-dist/doc/support/l3sys-query/l3sys-query-tool.pdf
    trunk/Master/texmf-dist/doc/support/l3sys-query/l3sys-query-tool.tex
    trunk/Master/texmf-dist/scripts/l3sys-query/l3sys-query.lua

Modified: trunk/Build/source/texk/texlive/linked_scripts/l3sys-query/l3sys-query.lua
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/l3sys-query/l3sys-query.lua	2024-03-28 20:07:51 UTC (rev 70796)
+++ trunk/Build/source/texk/texlive/linked_scripts/l3sys-query/l3sys-query.lua	2024-03-28 20:08:03 UTC (rev 70797)
@@ -36,7 +36,7 @@
 -- Details of the script itself, etc.
 --
 local copyright = "Copyright (C) 2024 The LaTeX Project"
-local release_date = "2024-03-15"
+local release_date = "2024-03-28"
 local script_desc = "System queries for LaTeX using Lua\n"
 local script_name = "l3sys-query"
 
@@ -51,7 +51,7 @@
     exclude =
       {
         cmds = {"ls"},
-        desc = "Exclude entries from directory listing",
+        desc = "[<xarg>] Exclude entries from directory listing",
         type = "string"
       },
     ["ignore-case"] =
@@ -89,13 +89,13 @@
     sort =
       {
         cmds = {"ls"},
-        desc = "Method used to sort directory listing",
+        desc = "[name|date] Method used to sort directory listing",
         type = "string"
       },
     type = 
       {
         cmds = {"ls"},
-        desc  = "Selects the type of entry in a directory listing",
+        desc  = "[d|f] Select just the directories or files in a listing",
         type  = "string"
       },
     version =
@@ -235,6 +235,8 @@
     -- No options are allowed in position 1, so filter those out
     if a == "--version" or a == "-v" then
       cmd = "version"
+    elseif a == "--help" or a == "-h" then
+      cmd = "help"
     elseif not match(a,"^%-") then
       cmd = a
     end
@@ -523,14 +525,16 @@
 --
 -- Execute the given command
 --
-
--- Only 'known' commands do anything at all
-if cmd == "version" then
+if cmd == "help" then
+  help()
+  exit(0)
+elseif cmd == "version" then
   version()
   exit(0)
+-- Only 'known' commands do anything at all
 elseif not cmd_impl[cmd] then
   if cmd == "" then
-    help()
+    info_and_quit(script_name .. ": No " .. script_name .. " command specified.")
   else
     info_and_quit(script_name .. ": '" .. cmd .. "' is not a " .. script_name ..
       " command.")
@@ -541,7 +545,13 @@
 -- Check options are valid for cmd
 for k,_ in pairs(options) do
   local cmds = option_list[k].cmds
-  if not cmds then
+  if k == "help" then
+    help()
+    exit(0)
+  elseif k == "version" then
+    version()
+    exit(0)
+  elseif not cmds then
     -- Should not be possible:
     -- everything except --help and --version should have an entry
     print("Internal error")

Modified: trunk/Master/texmf-dist/doc/man/man1/l3sys-query.1
===================================================================
--- trunk/Master/texmf-dist/doc/man/man1/l3sys-query.1	2024-03-28 20:07:51 UTC (rev 70796)
+++ trunk/Master/texmf-dist/doc/man/man1/l3sys-query.1	2024-03-28 20:08:03 UTC (rev 70797)
@@ -1,4 +1,4 @@
-.TH L3SYS-QUERY 1 "2024-03-15" "LaTeX"
+.TH L3SYS-QUERY 1 "2024-03-28" "LaTeX"
 
 .SH NAME
 l3sys-query

Modified: trunk/Master/texmf-dist/doc/man/man1/l3sys-query.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/support/l3sys-query/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/support/l3sys-query/CHANGELOG.md	2024-03-28 20:07:51 UTC (rev 70796)
+++ trunk/Master/texmf-dist/doc/support/l3sys-query/CHANGELOG.md	2024-03-28 20:08:03 UTC (rev 70797)
@@ -7,6 +7,11 @@
 
 ## [Unreleased]
 
+## [2024-03-28]
+
+### Changed
+- Improvements to help
+
 ## [2024-03-15]
 
 ### Added
@@ -21,5 +26,6 @@
 ### Added
 - New script
 
-[Unreleased]: https://github.com/latex3/l3sys-query/compare/2024-03-15...HEAD
+[Unreleased]: https://github.com/latex3/l3sys-query/compare/2024-03-28...HEAD
+[2024-03-28]: https://github.com/latex3/l3sys-query/compare/2024-03-15...2024-03-28
 [2024-03-15]: https://github.com/latex3/l3sys-query/compare/2024-03-14...2024-03-15

Modified: trunk/Master/texmf-dist/doc/support/l3sys-query/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/support/l3sys-query/README.md	2024-03-28 20:07:51 UTC (rev 70796)
+++ trunk/Master/texmf-dist/doc/support/l3sys-query/README.md	2024-03-28 20:08:03 UTC (rev 70797)
@@ -1,6 +1,6 @@
 # `l3sys-query`: System queries for LaTeX using Lua
 
-Release 2024-03-15
+Release 2024-03-28
 
 ## Overview
 

Modified: trunk/Master/texmf-dist/doc/support/l3sys-query/l3sys-query-tool.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/support/l3sys-query/l3sys-query-tool.tex
===================================================================
--- trunk/Master/texmf-dist/doc/support/l3sys-query/l3sys-query-tool.tex	2024-03-28 20:07:51 UTC (rev 70796)
+++ trunk/Master/texmf-dist/doc/support/l3sys-query/l3sys-query-tool.tex	2024-03-28 20:08:03 UTC (rev 70797)
@@ -45,7 +45,7 @@
   }%
 }
 
-\date{Release 2024-03-15}
+\date{Release 2024-03-28}
 
 \maketitle
 \tableofcontents

Modified: trunk/Master/texmf-dist/scripts/l3sys-query/l3sys-query.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/l3sys-query/l3sys-query.lua	2024-03-28 20:07:51 UTC (rev 70796)
+++ trunk/Master/texmf-dist/scripts/l3sys-query/l3sys-query.lua	2024-03-28 20:08:03 UTC (rev 70797)
@@ -36,7 +36,7 @@
 -- Details of the script itself, etc.
 --
 local copyright = "Copyright (C) 2024 The LaTeX Project"
-local release_date = "2024-03-15"
+local release_date = "2024-03-28"
 local script_desc = "System queries for LaTeX using Lua\n"
 local script_name = "l3sys-query"
 
@@ -51,7 +51,7 @@
     exclude =
       {
         cmds = {"ls"},
-        desc = "Exclude entries from directory listing",
+        desc = "[<xarg>] Exclude entries from directory listing",
         type = "string"
       },
     ["ignore-case"] =
@@ -89,13 +89,13 @@
     sort =
       {
         cmds = {"ls"},
-        desc = "Method used to sort directory listing",
+        desc = "[name|date] Method used to sort directory listing",
         type = "string"
       },
     type = 
       {
         cmds = {"ls"},
-        desc  = "Selects the type of entry in a directory listing",
+        desc  = "[d|f] Select just the directories or files in a listing",
         type  = "string"
       },
     version =
@@ -235,6 +235,8 @@
     -- No options are allowed in position 1, so filter those out
     if a == "--version" or a == "-v" then
       cmd = "version"
+    elseif a == "--help" or a == "-h" then
+      cmd = "help"
     elseif not match(a,"^%-") then
       cmd = a
     end
@@ -523,14 +525,16 @@
 --
 -- Execute the given command
 --
-
--- Only 'known' commands do anything at all
-if cmd == "version" then
+if cmd == "help" then
+  help()
+  exit(0)
+elseif cmd == "version" then
   version()
   exit(0)
+-- Only 'known' commands do anything at all
 elseif not cmd_impl[cmd] then
   if cmd == "" then
-    help()
+    info_and_quit(script_name .. ": No " .. script_name .. " command specified.")
   else
     info_and_quit(script_name .. ": '" .. cmd .. "' is not a " .. script_name ..
       " command.")
@@ -541,7 +545,13 @@
 -- Check options are valid for cmd
 for k,_ in pairs(options) do
   local cmds = option_list[k].cmds
-  if not cmds then
+  if k == "help" then
+    help()
+    exit(0)
+  elseif k == "version" then
+    version()
+    exit(0)
+  elseif not cmds then
     -- Should not be possible:
     -- everything except --help and --version should have an entry
     print("Internal error")



More information about the tex-live-commits mailing list.