Proposal: Add showCommandForUser to process:System.Process

Ian Lynagh igloo at
Wed Sep 15 09:29:50 EDT 2010

On Sun, Sep 12, 2010 at 09:58:44PM -0400, Isaac Dupree wrote:
> On 09/12/10 08:24, Ian Lynagh wrote:
>> Add showCommandForUser to process:System.Process
>> There are many programs (e.g. ghc and Cabal) which run other programs,
>> and when run with -v want to show the user what they are running. The
>> user then often wants to run the command by hand, in order to debug a
>> problem, but this can be tricky when the command or its arguments
>> include spaces or other characters treated specially by shells.
> *Which* shells, though, can it run in?

Ah, you are right, I should have added a haddock doc!

-- | Given a program @p@ and arguments @args@,
--   @showCommandForUser p args@ returns a string suitable for pasting
--   into sh (on POSIX OSs) or cmd.exe (on Windows).


More information about the Libraries mailing list