Hey folks,

I've written a new "GetOpt" script library for parsing UNIX-style command line options. I'll be using it for developing some command-line tooling used during the LiveCode development process.

It supports lots of different ways of specifying command line options:

* Short options (-h)
* Combined short options ("-h -v" is the same as "-hv")
* Short options with arguments ("-Werror" / "-W error")
* Long options (--help)
* Long options with arguments ("--output=foo" / "--output foo")

It also supports the special "--" meta-option for ending command-line parsing, reports misuse of options in a useful way, and gathers up non-option arguments.

Here's the PR, in case you want to grab the code:

https://github.com/livecode/livecode/pull/4178

I don't expect it will be installed as part of LiveCode until the IDE has a better user experience for developing command-line applications, but it might be fun to play with for people who are interested in that sort of thing.

                                               Peter

--
Dr Peter Brett <peter.br...@livecode.com>
LiveCode Technical Project Manager

LiveCode 2016 Conference: https://livecode.com/edinburgh-2016/

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to