diff options
Diffstat (limited to 'Master/texmf')
-rwxr-xr-x | Master/texmf/scripts/texlive/texdoc.tlu | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/Master/texmf/scripts/texlive/texdoc.tlu b/Master/texmf/scripts/texlive/texdoc.tlu index d106d533a61..d7a3e655cd5 100755 --- a/Master/texmf/scripts/texlive/texdoc.tlu +++ b/Master/texmf/scripts/texlive/texdoc.tlu @@ -63,22 +63,17 @@ mode = 'view' verbose = false while table.maxn(arg) > 0 and string.match(arg[1],'^%-') do curr_arg = table.remove(arg,1) - if string.match (curr_arg,'-h') - or string.match (curr_arg,'--help') then + if (curr_arg == '-h') or (curr_arg == '--help') then print (usage_msg) os.exit(0) - elseif string.match (curr_arg,'-V') - or string.match (curr_arg,'--version') then + elseif (curr_arg == '-V') or (curr_arg == '--version') then print (progname .. ' version: ' .. version ) os.exit(0) - elseif string.match (curr_arg,'-v') - or string.match (curr_arg,'--verbose') then + elseif (curr_arg == '-v') or (curr_arg == '--verbose') then verbose = true - elseif string.match (curr_arg,'-l') - or string.match (curr_arg,'--list') then + elseif (curr_arg == '-l') or (curr_arg == '--list') then mode = 'list' - elseif string.match (curr_arg,'-s') - or string.match (curr_arg,'--search') then + elseif (curr_arg == '-s') or (curr_arg == '--search') then mode = 'search' end end @@ -494,16 +489,16 @@ for docname in list_iter (arg) do docname = alias[docname] end local docfound = false - if string.match(mode,'search') then + if (mode == 'search') then docfound = true pattern_search(docname) - elseif string.match(mode,'view') or string.match(mode,'list') then + elseif (mode == 'view') or (mode == 'list') then for ext in list_iter(config.ext_list) do filename = kpse.find_file(docname .. ext, "TeX system documentation") if filename then docfound = true - if string.match (mode, 'list') then + if (mode == 'list') then print(filename) else -- mode is view, is unzipping needed? prepare_viewing(ext) |