MegaGlest Forum

Archives (read only) => Glest Advanced Engine => Bug reports => Topic started by: tomreyn on 16 April 2011, 02:56:43

Title: [Fixed] Inconsistent CLI argument format
Post by: tomreyn on 16 April 2011, 02:56:43
To make the game show the CLI usage, you need to invoke
Code: [Select]
glestadv --help
This, on the other hand, will not display the usage:
Code: [Select]
glestadv -help
Instead, this results in this output:
Code: [Select]
unknown argument: -help
All the other CLI arguments use a single dash format, though, as the usage shows:
Code: [Select]
glestadv --help
usage: ./build/source/game/glestadv [options]
  -server                  startup and immediately host a game
  -client IP               startup and immediately connect to server IP
  -configdir path          set location of configs and logs to path
  -datadir path            set location of data
  -loadmap map tileset     load maps/map.gbm with tilesets/tileset for map preview
  -scenario category name  load immediately scenario/category/name

Trying to invoke GAE with a double-dashed variant of these options again results in (for example):
Code: [Select]
unknown argument: --client
GAE should either accept only single or only double-dashes CLI arguments, or both, but not require single-dashes arguments in some and double-dashed arguments in other cases (unless a getopts-like difference of single vs. multiple character arguments is made).
Title: Re: Inconsistent CLI argument format
Post by: Omega on 16 April 2011, 05:10:48
Proposal: Have *both* single and double dashes work. Thus "--help" and "-help" would be the same thing.
Title: Re: Inconsistent CLI argument format
Post by: silnarm on 16 April 2011, 14:03:17
Both it is.