Browse thread
[Caml-list] Wildcard expansion/command line
-
Jens Olsson
-
Maxence Guesdon
- T. Kurt Bond
- Oliver Bandel
- John Max Skaller
-
Maxence Guesdon
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2002-05-14 (12:52) |
From: | T. Kurt Bond <tkb@t...> |
Subject: | Re: [Caml-list] Wildcard expansion/command line |
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