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,e219d94b946dfc26 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!newsfeed.gamma.ru!Gamma.RU!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!colt.net!feeder.news-service.com!tudelft.nl!txtfeed1.tudelft.nl!surfnet.nl!surfnet.nl!newsfeed1.funet.fi!newsfeeds.funet.fi!nntp.inet.fi!central1.inet.fi!inet.fi!read3.inet.fi.POSTED!53ab2750!not-for-mail Sender: AWI003@FIW9752 Newsgroups: comp.lang.ada Subject: Re: Ada.Command_Line and wildcards References: <45dcaed8_6@news.bluewin.ch> <1172132169.423514.271890@s48g2000cws.googlegroups.com> <87hctei5pf.fsf@ludovic-brenta.org> From: Anders Wirzenius Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 26 Feb 2007 11:59:05 GMT NNTP-Posting-Host: 194.251.142.2 X-Complaints-To: abuse@inet.fi X-Trace: read3.inet.fi 1172491145 194.251.142.2 (Mon, 26 Feb 2007 13:59:05 EET) NNTP-Posting-Date: Mon, 26 Feb 2007 13:59:05 EET Organization: Sonera corp Internet services Xref: g2news2.google.com comp.lang.ada:9548 Date: 2007-02-26T11:59:05+00:00 List-Id: Simon Wright writes: > Anders Wirzenius writes: > > > ... so one can ask why the design was not done the opposite way: If > > you want to have the shell to expand, use an option (like find -x > > *.adb), else the parameter is passed as such to the application. > > That sounds a very odd design. The shell would have to parse the > command line to see if there was an option requiring expansion. And > what if -x already had a meaning to the program? > Sorry, I was unclear. I meant a design where The option (-x, -y, whatever) goes to the application (find, loose, whatever) which will parse the command line and then decide how to call shell services. Not the other way around: command line first to shell and then the result to the application. > The Unix shell design seems quite clear -- unescaped wildcards get > expanded. Of course, it's not just '*' wildcards; expressions such as > *.ad[bs] or foo.{adb,ads} also have their place. > > I think we ought to live with the shells the way they are -- it's true > of Ada, after all. Yes, we live and discuss. ;) -- Anders