Skip to content

Add GNU style long command line arguments

Peter W. Draper requested to merge long-cmdline-arguments into master

We are running out of letters for the command line options, which are becoming increasingly less memorable, so this is an attempt to introduce GNU style long arguments like --self-gravity to extend the range of possible options and make them more self describing.

I've added a small amount of code from another project, rather than using getopt_long, as the latter is not POSIX, and the code I found is well written and provides a good basis for what we need. The licensing is compatible with the GPL, although not the same (MIT/X11).

This also brings the documentation of the option to the same place as the definition and allows grouping, so we have simulation and basic control options separated.

@nnrw56, @matthieu, @jborrow, @lhausammann how does this look to you?

The next stage would seem to be to release some of the single character options from the less used options...

Edited by Peter W. Draper

Merge request reports