finding locations of many files via kpse
Karl Berry
karl at freefriends.org
Mon Aug 5 22:18:10 CEST 2024
Hi Erik,
in GNU's getopt library, long options are always preceded
by two dashes.
Well, that is the default, but it is quite common to call
getopt_long_only, not getopt_long, and then -mark is the same as --mark.
(And --mar is also accepted, etc.)
Specifically, I used getopt_long_only pervasively throughout the TeX
engines, drivers, etc., back when I unified option handling among the
programs extant in the late 1980s. Programs added since then sometimes
use getopt_long_only, sometimes not. We use the Perl equivalent of
getopt_long_only in tlmgr and install-tl.
My hope is that lua-alt-getopt is somewhat aligned with other CLIs
within TeX Live, but I'm guessing this script is for internal use.
I don't know what you mean. lua-alt-getopt was an early Lua option
parsing package written independently by Aleksey Cheusov (and not
updated since 2010). It's not used within TL as far as I know.
Grepping in a bindir, I see that luaotfload-tool uses it, and, so far as
that grep showed, nothing else.
I'll have to admit that I'm a great fan of GNU's getopt semantics.
Me too. That's why I used it. At some point I had to copy the source
files into TL (kpathsea/getopt*) because of incompatibilities, but it's
still GNU getopt.
However, from a historical standpoint, the alternative getopt
library within TeX Live should be favored instead,
I'm not aware of any "alternative library" in TL (for C).
Happy option hacking,
Karl
More information about the texhax
mailing list.