Not logged inOpenClonk Forum
Up Topic Development / Developer's Corner / c4group syntax
- - By K-Pone [de] Date 2016-05-07 15:24
The syntax of c4group is a little bit confusing for newbies in my opinion. At least for those who used command line tools before. In almost every command line tool the syntax is like "./programm options file" (i.e. tar -xzvf /opt/somearchive.tar.gz).

In c4group however the file and option parameter are flipped (c4group Objects.ocd -x). As someone who is used to work with command line tools a lot, I'd probably enter "c4group -x Objects.ocd" (which I still do sometimes by accident) when I don't think about the syntax is not like in other programs.

As I know from some linux command line tools, they can handle the c4group syntax as well, but most people I know who work on a command line quite often would also enter "c4group -x Objects.ocd".
Parent - By Luchs [de] Date 2016-05-07 17:10
tar definitely isn't an example of good CLI design, though.

Instead of just flipping the "action" switch, I'd replace it with a full word, like c4group explode Object.ocd.
Parent - By Günther [de] Date 2016-05-12 01:45
The syntax is mostly a result of the simplistic approach to parameter handling the code has. Somebody could probably rewrite it using getopt without breaking compatibility.
Reply
Up Topic Development / Developer's Corner / c4group syntax

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill