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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no 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!postnews.google.com!p10g2000cwp.googlegroups.com!not-for-mail From: "Hyman Rosen" Newsgroups: comp.lang.ada Subject: Re: Ada.Command_Line and wildcards Date: 7 Mar 2007 11:21:47 -0800 Organization: http://groups.google.com Message-ID: <1173295307.860021.90570@p10g2000cwp.googlegroups.com> References: <45dcaed8_6@news.bluewin.ch> <1172132169.423514.271890@s48g2000cws.googlegroups.com> <545bgvF1ttrphU1@mid.individual.net> <1495406.QZvfpqijrQ@linux1.krischik.com> <6dy7mn3hhu.fsf@hod.lan.m-e-leypold.de> <1172328891.5496.62.camel@localhost.localdomain> <1173096982.3712.37.camel@localhost> <8utzwzzv0v.fsf@hod.lan.m-e-leypold.de> <1173185771.11841.69.camel@localhost> NNTP-Posting-Host: 204.253.248.208 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1173295339 4141 127.0.0.1 (7 Mar 2007 19:22:19 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 7 Mar 2007 19:22:19 +0000 (UTC) In-Reply-To: <1173185771.11841.69.camel@localhost> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2; .NET CLR 2.0.50727) Gecko/20070219 Firefox/2.0.0.2,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: p10g2000cwp.googlegroups.com; posting-host=204.253.248.208; posting-account=lJDDWg0AAACmMd7wLM4osx8JUCDw_C_j Xref: g2news2.google.com comp.lang.ada:9758 Date: 2007-03-07T11:21:47-08:00 List-Id: On Mar 6, 7:56 am, Georg Bauhaus wrote: > When it comes to echo *.ads, a decision was necessary as to what > should happen when there is no matching file name. The choice was > not: reflect this fact and produce the empty result. This might > have had other consequences somewhere else. Instead, it > was to produce the pattern itself--which is very different from > a file name. One of those other consequences is that many, if not most, UNIX programs treat a no-argument command as meaning "do your default action". So 'ls' with no directory arguments lists the current directory and 'cat' with no file arguments reads standard input, and so forth. If I wrote 'cat *.ads' and there were no such files and the shell expanded that to nothing, 'cat' would sit endlessly awaiting input from the terminal. As it stands, I get 'cat: cannot open *.ads' and I see the problem. What we have is a design that works pretty well interactively and pretty well in scripts, failing only on a few weird cases. That's good enough, because it gets you to 90% of what you need, and Worse is Better.