WinHugs Command Line Parsing

Sigbjorn Finne sof@galconn.com
Wed, 21 Nov 2001 00:08:21 -0800


Hi,

better late than never, I hope.. the following works for me w/
WinHugs Feb2001:

 c:\> d:\progra~1\Hugs98\WinHugs "-Ec:\Progra~1\winedt\winedt.exe
 -E=c:\Progra~1\winedt\WinEdt.Ini [Open('%s');SelLine(%d,7)]"
 c:\src\haskell\SomeFile.hs

i.e., notice that the entire -E option is surrounded in d-quotes, not just
its contents.

hth
--sigbjorn

----- Original Message -----
From: "Phil Molyneux" <molyneux@kingston.ac.uk>
To: <hugs-bugs@haskell.org>
Cc: "Chris Reade" <Chris.Reade@kingston.ac.uk>; "Paul Reardon"
<bs_s515@kingston.ac.uk>; "Dan Russell" <djrussell@kingston.ac.uk>; "Barry
Avery" <B.Avery@kingston.ac.uk>; "David Martland"
<D.Martland@kingston.ac.uk>
Sent: Monday, October 01, 2001 02:46
Subject: WinHugs Command Line Parsing


> Hello --- This is to report a possible bug with WinHugs command line
> parsing. We have installed hugs and winhugs from hugs98-Feb2001.msi.
>
> We need to run hugs or winhugs with an option to set the editor, like this
>
> -E"I:\business\winedt32\winedt.exe -E=H:\WinEdt.INI
[Open('%s");SelLine(%d,7)]"
>
> This tells Hugs to use the WinEdt editor which is given its -E option to
set
> the place it looks for an initialization file (ie the users local file not
> the network copy) and to open the file %s at line %d with colour red (7).
>
> With hugs.exe in a DOS box this option works fine. However with WinHugs we
> get the error message
>
> ERROR [Open(%d),SelLine(%d,7)]" - Unable to open file
> "[Open(%d),SelLine(%d,7)]""
>
> and the editor is set to ``=H:\WinEdt.INI''
>
> It looks as if the command line parsing for WinHugs (but not Hugs) is
taking
> the second ``-E'' as a Hugs option (not a WinEdt option).
>
> A workround is to set registry settings or set the environment variable
> HUGSFLAGS but command line options are safer since users may reset
registry
> settings and affect the next user of the machine (we are running MS-NT
with
> a Novell networks).
>
> Has anybody else come across this problem and are there ways of quoting
> things to get the command line to work for WinHugs?
>
> Thanks --- Phil
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Phil Molyneux                             email  molyneux@kingston.ac.uk
> tel  work 020 8547 2000 x 5233  direct 020 8547 8233  home 020 8549 0045
> Kingston Business School room 339 WWW http://www.kingston.ac.uk/~bs_s024
> Kingston University,  Kingston Hill,  Kingston upon Thames  KT2 7LB,  UK
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
> _______________________________________________
> Hugs-Bugs mailing list
> Hugs-Bugs@haskell.org
> http://www.haskell.org/mailman/listinfo/hugs-bugs