So different commands can (and do) have different quoting and globbing
semantics. Great huh?
it does have its advantages, though. as i'm implementing a package
globbing, i'd like to avoid file globbing being applied to these same
parameters.
We could have a -no-globbing link-time option, but that would prevent
ghc-pkg register *.pkg
from cmd.exe (though not bash). The whole thing is so broken I don't think
there *is* a good solution.
perhaps there is no general solution, but for the ghc-pkg case, we
know where we expect file parameters, and we know we can't
handle '?' or '*' in there, so we could play the windows game,
switch of general globbing, and call a globbing rountine to
expand any ?* left in file parameter positions.
now, a general file globbing function might be usefully extracted
from FileManip or similar, but we wanted to avoid adding
dependencies. so, we could simply use the test program i had:
-- glob.hs
import System.Environment; main = getArgs >>= print
calling this, with a file parameter only, would give us a win32
style file expansion for any ?* in that parameter. unless ghc-pkg
was called from cygwin's bash, in which case that will already
have done the file expansion, bash-style, leaving no work for
glob.hs.
or, we could use '.' instead of '*', and use the patch i sent?-)
claus
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc