diff options
Diffstat (limited to 'Master/texmf-dist/scripts/texdoc/main.tlu')
-rw-r--r-- | Master/texmf-dist/scripts/texdoc/main.tlu | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Master/texmf-dist/scripts/texdoc/main.tlu b/Master/texmf-dist/scripts/texdoc/main.tlu index 3b5aa3a421c..0058a55da8f 100644 --- a/Master/texmf-dist/scripts/texdoc/main.tlu +++ b/Master/texmf-dist/scripts/texdoc/main.tlu @@ -1,3 +1,4 @@ +-- $Id: main.tlu 24 2017-11-18 23:00:18Z karl $ -- main.tlu: default command-line interface of texdoc -- -- Manuel Pégourié-Gonnard, GPLv3, see texdoclib.tlu for details @@ -15,7 +16,7 @@ local action_help = [[ -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) @@ -36,13 +37,19 @@ elseif action == 'files' then texdoc.show_config_files(print, true) os.exit(exit_ok) elseif action == 'view' then + if not arg[1] then + 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]) os.exit(ok and exit_ok or exit_error) end -- 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 |