[GHC] #3802: :main in GHCi doesn't do getArgs wildcard expansion
GHC
trac at galois.com
Sun Jan 3 13:49:44 EST 2010
#3802: :main in GHCi doesn't do getArgs wildcard expansion
---------------------------------+------------------------------------------
Reporter: NeilMitchell | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: GHCi | Version: 6.12.1
Resolution: | Keywords:
Os: Windows | Testcase:
Architecture: Unknown/Multiple | Failure: Incorrect result at runtime
---------------------------------+------------------------------------------
Comment (by isaacdupree):
getArgs never does wildcard expansion -- it's your shell (whichever one
you use -- bash is common) that does it before invoking the process that
you told it to invoke.
(This is a common point of confusion, since it's the process's
responsibility to deal with other things like command-line arguments.
Bash's magic symbols to watch out for are, I believe,
{{{
globbing: ?*{}
quoting: '"\
interpolation: $`~
pipes/multiple-commands: <>|&
comments: #
history (if enabled): !
}}}
It would be nontrivial for GHCi to copy globbing and quoting behavior, and
impossible for it to mimic whatever-your-shell-is exactly (unless by
invoking your shell as a subprocess. Which wouldn't really work for GHCi,
which is meant to remain within a single ghc-process.)
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3802#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list