Skip to content

Commit

Permalink
Merge pull request #124 from mgkurtz/getopt
Browse files Browse the repository at this point in the history
Fix parsing `texdoc -c --help` etc. (#121)
  • Loading branch information
wtsnjp authored Feb 7, 2025
2 parents 9535c1f + 4ee0fe2 commit 1a103b6
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions script/texdoclib-cli.tlu
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,10 @@ local function getopt(arg, options)
end

-- check the existence of an argument
if not tmp then
if not tmp or tmp:match('^%-') then
err_print('error',
'Option -%s requires an argument.', jopt)
os.exit(C.exit_error)
end

if tmp:match('^%-') then
table.insert(tab, {jopt, false})
else
table.insert(tab, {jopt, tmp})
end
Expand Down

0 comments on commit 1a103b6

Please sign in to comment.