Permalink
Browse files

Update optparse documentation.

  • Loading branch information...
1 parent 6eda9fa commit aaf9a6729948c0002e2dca2c8c44dc85967cd0a9 Joshua Phillips committed Aug 1, 2010
Showing with 5 additions and 0 deletions.
  1. +5 −0 optparse.txt
View
@@ -75,6 +75,11 @@ argument string. For example, `"-a:"` would match `"-aYYY"`,
and "YYY" would become the argument).
* `"--XXX="` - long option that takes an argument. For example,
`"--output="` would match `"--output=YYY"` or `"--output YYY"`.
+* `"--XXX?"` - long option that takes an optional argument. For example,
+`"--with-lua?"` would match `"--with-lua"` or `"--with-lua=/usr"`. It would
+match `"--with-lua /usr"` but "/usr" would be interpreted as a positional
+argument, because it would be rather difficult not to.
+If an argument is not given, the field in the returned table is set to `true`.
Option items can also have the following fields:

0 comments on commit aaf9a67

Please sign in to comment.