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!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!news.karotte.org!feeder06.uucp-net.de!news.uucp.at!news.albasani.net!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Ada.Command_Line and wildcards Date: Thu, 22 Feb 2007 19:01:22 -0600 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: static-69-95-181-76.mad.choiceone.net X-Trace: jacob-sparre.dk 1172192412 14355 69.95.181.76 (23 Feb 2007 01:00:12 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 23 Feb 2007 01:00:12 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 Xref: g2news2.google.com comp.lang.ada:9433 Date: 2007-02-22T19:01:22-06:00 List-Id: "Markus E Leypold" wrote in message news:a7ps82yrax.fsf@hod.lan.m-e-leypold.de... ... > Actually it ist. In > > find . -name '*.txt' > > the program 'find' decides to do the wildcard expansion on '*'. The > wildcard expansion the shell does, is just an additional service. You > can just not use it, by enclosing every word on the command line in > "'". You're missing the point. The "Find" program can't decide anything; it has to require the user to quote everything. If the user doesn't quote it, they'll get garbage (precisely why I could never remember how find was supposed to work on Unix - I ended up writing shell scripts to cover up this obnoxious behavior. 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. This is exactly the same reason that anonymous access types are not a usable replacement 'in out' parameters in functions. Using them requires the client to do various handstands (use 'Access, declare the object as aliased) for no benefit at all to the client. That is silly; it breaks encapsulation. 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. Randy.