From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA17917; Tue, 14 May 2002 14:52:36 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA17913 for ; Tue, 14 May 2002 14:52:35 +0200 (MET DST) Received: from tkb.mpl.com ([66.109.164.210]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g4ECqYn08185 for ; Tue, 14 May 2002 14:52:34 +0200 (MET DST) Received: from tkb.mpl.com (tkb.mpl.com [66.109.164.210]) by tkb.mpl.com (8.11.6/8.11.6) with ESMTP id g4ECqW902881; Tue, 14 May 2002 08:52:33 -0400 (EDT) (envelope-from tkb@tkb.mpl.com) From: "T. Kurt Bond" Message-ID: <15585.2192.709871.920355@tkb.mpl.com> Date: Tue, 14 May 2002 08:52:32 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: caml-list@inria.fr Subject: Re: [Caml-list] Wildcard expansion/command line In-Reply-To: <20020514102405.1ff7a399.maxence.guesdon@inria.fr> References: <20020514075059.30862.qmail@operamail.com> <20020514102405.1ff7a399.maxence.guesdon@inria.fr> X-Mailer: VM 7.00 under Emacs 21.2.1 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Maxence Guesdon writes: > > > So, how does it work? > > *the shell* expands your unquoted wildcards before passing the args > to your program. Not so, strictly speaking. Under MS Windows the O'Caml runtime apparently expands wildcards itself, if the shell hasn't already. (See byterun/main.c:main() for the call to expand_command_line() and look at win32.c for expand_command_line() and its helper functions.) What did it do under pre-X versions of MacOS? I think that historically having the shell expand the wildcards for the program was the *unusual* situation and having the program expand the wildcards itself was usual. The "program expands wildcards" has its advantages (as anybody who has used the VMS command "$ rename *.COM *.SAV" can attest) but having the shell do it makes most programs simpler, which is probably why Unix ended up with the shell doing the work. -- T. Kurt Bond, tkb@tkb.mpl.com ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners