From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,21def7b4562d91bf X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 X-Received: by 10.66.73.134 with SMTP id l6mr338138pav.0.1355844803307; Tue, 18 Dec 2012 07:33:23 -0800 (PST) Path: s9ni51875pbb.0!nntp.google.com!news.glorb.com!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Brian Drummond Newsgroups: comp.lang.ada Subject: Re: GCLP (Generic Command Line Parser) 1.0.0 released Date: Tue, 18 Dec 2012 15:33:22 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <0160c8ce-1e7c-4e2c-9641-c76502adadd9@googlegroups.com> <9e1a279f-5dc0-47a8-8196-05de1f95e9da@googlegroups.com> <142eeaa9-839c-412e-8eec-c7aff4ef8b8b@googlegroups.com> Mime-Version: 1.0 Injection-Date: Tue, 18 Dec 2012 15:33:22 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="dfff62e1e537b55df42008571c03e0fe"; logging-data="17169"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+dTzcElBJAqwdR1IAfjkmrxZSHKp+9/1Q=" User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) Cancel-Lock: sha1:dL3X25ZOQLIkIlgWpxsSN/XBjvE= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: 2012-12-18T15:33:22+00:00 List-Id: On Sat, 15 Dec 2012 10:08:05 -0800, mockturtle wrote: > On Saturday, December 15, 2012 5:57:07 PM UTC+1, Hibou57 (Yannick > DuchĂȘne) wrote: >> If the command line become too complex, that may suggest the command is >> >> not well suited for the matter. May be a configuration file or project >> >> file, using XML, could be an option. > Yes, I understand, but between a simple command like > > cp src dst > > and a command that makes it convenient to give parameters via a > configuration file (maybe in XML format), there is a gray area where a > positional syntax is too complex (was the port number the first > parameter? or the third?), but the complexity of a configuration file > is not justified (maybe also because you use the command only once). Perhaps you can combine the two modes : the GCLP could read a complex command line, or some/all of the options - in the exact same syntax - from file. It would make refactoring complex command lines effortless... - Brian