[tex-live] More on multiple minuses
Heiko Oberdiek
oberdiek at uni-freiburg.de
Fri Sep 5 14:18:04 CEST 2008
On Fri, Sep 05, 2008 at 01:16:46PM +0200, Martin Schröder wrote:
> 2008/9/5 Philip TAYLOR <P.Taylor at rhul.ac.uk>:
> > > tlmgr ---help
> >
> > the first three of which appeared to generate
> > the same output, and the fourth of which
> > diagnosed an error. Is there any difference
>
> man 1 bash
> -- A -- signals the end of options and disables further
> option processing. Any arguments after
> the -- are treated as filenames and arguments. An
> argument of - is equivalent to --.
tlmgr isn't bash and bash doesn't process options for other
programs. It's the task of the program which kind of syntax
it uses for its options.
Also '---help' isn't '--', the marker '--' is an argument of its own.
Thus some white space is needed to separate the marker from the
following stuff.
However tlmgr uses Getopt::Long:
| use Getopt::Long qw(:config no_autoabbrev require_order);
This perl package supports the convention, that an argument '--'
stops option processing of GetOptions.
The settings 'no_autoabbrev' and 'require_order' mean:
| auto_abbrev Allow option names to be abbreviated to
| uniqueness. Default is enabled unless envi
| ronment variable POSIXLY_CORRECT has been set,
| in which case "auto_abbrev" is disabled.
| require_order
| Whether command line arguments are allowed to
| be mixed with options. Default is disabled
| unless environment variable POSIXLY_CORRECT
| has been set, in which case "require_order" is
| enabled.
'-help' works, because the feature "bundling" is not enabled.
"bundling" means, that short one-character options may be
merged together, e.g. "-h -e" could be given as "-he".
The price, long options must then be preceded by '--' to avoid
ambiguity.
Yours sincerely
Heiko <oberdiek at uni-freiburg.de>
More information about the tex-live
mailing list