home *** CD-ROM | disk | FTP | other *** search
- .\"----------------------------------------------------------------------------
- .\"-- This text was extracted using the following command:
- .\"-- xdoc -man -n -p '[ \t]*' -I CAVEATS ../xparse.c
- .\"----------------------------------------------------------------------------
- .SH CAVEATS
- .PP
- Because of the way argument parsing is implemented under \s-1UNIX\s+1,
- \s-1MS-DOS\s+1, and \s-1OS/2\s+1,
- option arguments which contain a leading dash (`\-') (or whatever the
- option prefix character is defined to be) may \fInot\fP be specified
- as a separate argument on the command line, it must be part of the
- same argument. That is to say that if a program has a \fB\-f\fP option
- that requires a string argument, then the following:
- .sp 4p
- .RS
- .ft 4
- \-f\-arg
- .ft R
- .RE
- .sp 4p
- will properly assign the string ``\fB\-arg\fP'' to the option whereas
- the following:
- .sp 4p
- .RS
- .ft 4
- \-f\0\-arg
- .RE
- .sp 4p
- will be interpreted by \fIparseargs\fP as two option strings: the first
- of which (``\fB\-f\fP'') is missing a required argument and the second of
- which (``\fB\-arg\fP'') will most likely be flagged as an invalid option.
- .PP
- Similarly, if the user requires an \s-1\fIARGLIST\fP\s+1 option
- to take multiple arguments with leading dashes then the following
- method must be used: It is a ``feature'' of \fIparseargs\fP that
- \s-1\fIARGLIST\fP\s+1 arguments are always appended to the current
- list of arguments for the given option. Thus, if ``\fB\-f\fP'' is
- an option taking a list of arguments, then the following are all
- equivalent:
- .sp 8p
- .RS
- .ft 4
- \-farg1 arg2
- .sp 4p
- \-f arg1 arg2
- .sp 4p
- \-farg1 \-farg2
- .sp 4p
- \-f arg1 \-f arg2
- .ft R
- .RE
- .sp 8p
- Hence multiple ``leading dash'' arguments may specified as follows:
- .sp 4p
- .RS
- .ft 4
- \-f\-dash_arg1 \-f\-dash_arg2 ...
- .ft R
- .RE
-