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 Path: g2news2.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!news.albasani.net!news.ecp.fr!news.jacob-sparre.dk!pnx.dk!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: Ada.Command_Line and wildcards Date: Fri, 23 Feb 2007 09:43:48 +0100 Organization: Jacob's private Usenet server Message-ID: References: <45dcaed8_6@news.bluewin.ch> <1172132169.423514.271890@s48g2000cws.googlegroups.com> <87hctei5pf.fsf@ludovic-brenta.org> NNTP-Posting-Host: taasingegade.news.jacob-sparre.dk Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: jacob-sparre.dk 1172220231 14098 85.82.239.166 (23 Feb 2007 08:43:51 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 23 Feb 2007 08:43:51 +0000 (UTC) User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:MmsNF0oCTTT2VuSiCzGTVbMrUds= Xref: g2news2.google.com comp.lang.ada:9447 Date: 2007-02-23T09:43:48+01:00 List-Id: Randy Brukardt wrote: > You're missing the point. The "Find" program can't decide anything; > it has to require the user to quote everything. That depends on the user's choice of shell. But it is of course true for a POSIX compliant shell. > It is never sensible to force clients to be aware of things that > they should not logically have to care about. Whether the shell or > the program wants to expand file names is completely irrelevant to > the user - it simply should not matter to the use of a program. But if the programs do the expansion, you can be certain that the expansion will differ from program to program. Wouldn't that be _much_ more inconsistent than having known, uniform rules? (even if you don't like them) > Thus I conclude that the Unix shell behavior (especially as it is > not consistent, in that an exec'd program doesn't get the benefit, > so the application has to be prepared to handle wildcards anyway -- > or be stupidly fragile) is harmful, as it makes the user care about > irrelevant implementation details. But an exec'ed program is not started from a shell. If you want to start it from a shell, you use the system() function - and then you _do_ get proper file name expansion. Greetings, Jacob PS: I do agree that expanding patterns in Ada.Command_Line on non-POSIX operating systems, to emulate a POSIX shell is a bad idea. -- �But you have to be a bit wary of a ship that collects snowflakes.� -- Diziet Sma