Hi, is there an option for Hugs to just show a version string and quit immediately? (Could not find anything like that in the manual, and some plausible candidates I tried had not the desired effect.) I am interfacing Hugs from an IDE, and it would be nice if I just could 'ping' the executable a user has named in the Preferences, to find out whether it is there and would run and print the version to the user. Thanks and ciao, Leif
Leif Frenzel wrote:
Hi,
is there an option for Hugs to just show a version string and quit immediately? (Could not find anything like that in the manual, and some plausible candidates I tried had not the desired effect.)
Have you tried something like this (quick and dirty; some more sofisticated Perl solution might be suggested but I am not a Perl expert): echo :Q|hugs|grep Version|tr -d "|_" Release will print (e. g.): Version: November 2002 A CVS snapshot based executable will print (e. g.): Version: 20040720 To be more precise, some leading and trailing blanks may remain. But I'm sure you can figure it out how to remove them (and the word Version: as well if needed). -- Dmitry M. Golubovsky South Lyon, MI
Dimitry,
thanks for your answer. Unfortunately, the IDE is Eclipse, and it is
supposed to run on a range of platforms. I'm working on supporting Haskell
at least on Windows, Linux and MacOS, which rules out a system-dependent
approach. Calling the executable with an option is platform-independent, so
if this were possible, I would rather avoid platform-dependent solutions.
But it is a minor convenience feature anyway (the rest of the Hugs
integration works fine so far), so I will probably make a feature request to
the Hugs team and omit displaying the version in the UI for the time being.
Ciao,
Leif
----- Original Message -----
From: "Dimitry Golubovsky"
Leif Frenzel wrote:
Hi,
is there an option for Hugs to just show a version string and quit immediately? (Could not find anything like that in the manual, and some plausible candidates I tried had not the desired effect.)
Have you tried something like this (quick and dirty; some more sofisticated Perl solution might be suggested but I am not a Perl expert):
echo :Q|hugs|grep Version|tr -d "|_"
Release will print (e. g.):
Version: November 2002
A CVS snapshot based executable will print (e. g.):
Version: 20040720
To be more precise, some leading and trailing blanks may remain. But I'm sure you can figure it out how to remove them (and the word Version: as well if needed).
-- Dmitry M. Golubovsky South Lyon, MI
participants (2)
-
Dimitry Golubovsky -
Leif Frenzel