| 1 |
Good command-line options conventions: |
| 2 |
|
| 3 |
(These guided the design of CastleParameters unit. |
| 4 |
The OptionDescription routine honors it too.) |
| 5 |
|
| 6 |
Options specifications (printed in response to the --help parameter) |
| 7 |
should look like this : |
| 8 |
|
| 9 |
(only long form) |
| 10 |
' --long-option This option description' |
| 11 |
' --long-option ARGUMENT-NAME' |
| 12 |
' This option description' |
| 13 |
' --very-long-option-name ARGUMENT' |
| 14 |
' This option has very very long description' |
| 15 |
' that must be continued on the next line' |
| 16 |
|
| 17 |
(both forms, short and long, available) |
| 18 |
' -s / --long-option This option description' |
| 19 |
' -s / --long-option ARGUMENT-NAME' |
| 20 |
' This option description' |
| 21 |
|
| 22 |
More formally: |
| 23 |
|
| 24 |
- if option has both short and long forms they are specified using |
| 25 |
'-s / --long-option' (with <space>/<space>), |
| 26 |
|
| 27 |
- all help lines can have at most 75 chars, |
| 28 |
|
| 29 |
- 2 spaces are required before option name, |
| 30 |
|
| 31 |
- option descriptions should always start at the 25th column, |
| 32 |
if you can (and want) you can start option description at the same |
| 33 |
line as option name + arguments specification (but always at 25th column, |
| 34 |
so you can't do this if option name + arguments is too long), |
| 35 |
if not - you have to go to the next line. Each subsequent description line |
| 36 |
must be prefixed with 24 spaces (always spaces, never tabs !). |