[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] command line arguments use single dash prefix but also accept doubledash (#136)

K K Subbu kksubbu.ml at gmail.com
Tue May 9 07:02:32 UTC 2017


On Monday 08 May 2017 02:33 AM, Eliot Miranda wrote:
> having --help and --version exit without error is goodness.  IIUC the
> problem here is that the info answered by --help (usage()) is also
> printed on error.  So usage should still be printed when the vm is
> invoked with invalid arguments and the vm should exit with an error
> code but should not answer an error code if usage is present noted in
> response to --help.

This is what the patch does:

$ ./squeak -help >/dev/null && echo pass && ./squeak --help >/dev/null 
&& echo pass
pass
pass
$ ^help^version
./squeak -version >/dev/null && echo pass && ./squeak --version 
 >/dev/null && echo pass
pass
pass
$ ./squeak --help >/dev/null || echo pass
unknown option: ---help
pass

Regards .. Subbu


More information about the Vm-dev mailing list