[texdoc-commits] [SCM] texdoc updated: r24 - trunk/script

karl at gnu.org.ua karl at gnu.org.ua
Sun Nov 19 00:00:18 CET 2017


Author: karl
Date: 2017-11-19 01:00:18 +0200 (Sun, 19 Nov 2017)
New Revision: 24

Modified:
   trunk/script/ChangeLog
   trunk/script/constants.tlu
   trunk/script/main.tlu
   trunk/script/texdoclib.tlu
Log:
message wording, no unrequested usage

Modified: trunk/script/ChangeLog
===================================================================
--- trunk/script/ChangeLog	2017-11-17 23:47:22 UTC (rev 23)
+++ trunk/script/ChangeLog	2017-11-18 23:00:18 UTC (rev 24)
@@ -1,3 +1,9 @@
+2017-11-18  Karl Berry  <karl at freefriends.org>
+
+* constants.tlu: version 2.0171; message wording.
+* main.tlu: message wording, don't print full usage unrequested.
+* texdoclib.tlu: export err_print.
+
 2017-11-05  Karl Berry  <karl at freefriends.org>
 
 * view.tlu (print_menu): off-by-one error in finding last valid number.
@@ -23,3 +29,5 @@
 * search.tlu (get_doclist): do get_doclist_texdocs search last, so
 its (highest priority) tree code is what counts.
 From Reuben Thomas, https://puszcza.gnu.org.ua/bugs/?369
+
+(This ChangeLog file public domain.)

Modified: trunk/script/constants.tlu
===================================================================
--- trunk/script/constants.tlu	2017-11-17 23:47:22 UTC (rev 23)
+++ trunk/script/constants.tlu	2017-11-18 23:00:18 UTC (rev 24)
@@ -21,7 +21,7 @@
 -- progname and version
 fullname    = kpse.find_file('texdoc/texdoclib', 'lua')
 progname    = 'texdoc'
-version     = '2.017'
+version     = '2.0171'
 
 -- make sure to update setup_config_from_cl() accordingly
 -- and set a default value in setup_config_from_defaults() if relevant
@@ -47,15 +47,16 @@
 
   -q, --quiet           Suppress warnings and most error messages.
   -v, --verbose         Print additional information (eg, viewer command).
-  -d, --debug[=list]    Activate debug output (restricted to list).
+  -d, --debug[=LIST]    Activate debug output (restricted to LIST).
 
 Environment variables: PAGER, BROWSER, PDFVIEWER, PSVIEWER, DVIVIEWER,
 and texdoc_* of each.
 
-Files: <texmf>/texdoc/texdoc.cnf, see output of the --files option.
+Files: <TEXMF>/texdoc/texdoc.cnf; see output of the --files option.
 Full manual available via `texdoc texdoc'.
 
-Please report bugs to <texdoc at tug.org>.
+texdoc home page: <https://tug.org/texdoc/>
+Please email bugs to <texdoc at tug.org>.
 ]]
 
 copyright_msg = [[
@@ -95,7 +96,7 @@
 }
 
 error_msg = [[
-Try `texdoc --help' for a short help, `texdoc texdoc' for the user manual.]]
+Try `texdoc --help' for short help, `texdoc texdoc' for full manual.]]
 
 notfound_msg = [[
 Sorry, no documentation found for PKGNAME.

Modified: trunk/script/main.tlu
===================================================================
--- trunk/script/main.tlu	2017-11-17 23:47:22 UTC (rev 23)
+++ trunk/script/main.tlu	2017-11-18 23:00:18 UTC (rev 24)
@@ -1,3 +1,4 @@
+-- $Id$
 -- main.tlu: default command-line interface of texdoc
 --
 -- Manuel Pégourié-Gonnard, GPLv3, see texdoclib.tlu for details
@@ -15,7 +16,7 @@
   -h, --help            Print this help message.
   -V, --version         Print the version number.
   -f, --files           Print the list of configuration files used.
-  --just-view file      Display file, given with full path (no searching).]]
+  --just-view FILE      Display FILE, given with full path (no searching).]]
 
 -- get configuration and parse command line
 local action = texdoc.setup_config_and_alias(arg)
@@ -37,7 +38,8 @@
     os.exit(exit_ok)
 elseif action == 'view' then
     if not arg[1] then
-        texdoc.print_usage()
+        texdoc.err_print('error', "missing file operand to --just-view")
+        texdoc.err_print('error', texdoc.const.error_msg)
         os.exit(exit_usage)
     end
     local ok = texdoc.view_file(arg[1])
@@ -46,7 +48,8 @@
 
 -- make sure we actually have argument(s)
 if not arg[1] then
-    texdoc.print_usage()
+    texdoc.err_print('error', "no action specified")
+    texdoc.err_print('error', texdoc.const.error_msg)
     os.exit(exit_usage)
 end
 


Property changes on: trunk/script/main.tlu
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id
\ No newline at end of property
Modified: trunk/script/texdoclib.tlu
===================================================================
--- trunk/script/texdoclib.tlu	2017-11-17 23:47:22 UTC (rev 23)
+++ trunk/script/texdoclib.tlu	2017-11-18 23:00:18 UTC (rev 24)
@@ -1,7 +1,8 @@
+-- $Id$
 -- texdoclib.tlu: the texdoc library
 
 --[[
-Copyright 2008, 2009, 2010, 2011 Manuel Pégourié-Gonnard.
+Copyright 2008, 2009, 2010, 2011, 2017 Manuel Pégourié-Gonnard.
 
 This program is free software: you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software
@@ -100,5 +101,6 @@
     show_config_files      = show_config_files,
     config                 = config,
     view_file              = view_file,
+    err_print              = err_print,
     const                  = C,
 }



More information about the texdoc-commits mailing list