It is usually more convenient to save preferred option settings in the environment rather than specifying them on the command line; they will then be used automatically each time the interpreter is started. The method for setting these options depends on the machine and operating system that you are using, and on the way that the Hugs system was installed. The following examples show some typical settings for Unix machines and PCs:
set HUGSFLAGS -P/usr/Hugs/lib:/usr/Hugs/libhugs -E"vi +%d %s"The P option is used to set the search path and the E is used to set the editor. The string quotes are necessary for the value of the E option becauses it contains spaces. The setting for the path assumes that the system has been installed in /usr/local/Hugs and will need to be modified accordingly if a different directory was chosen. The editor specified here is vi, which allows the user to specify a startup line number by preceding it with a + character. The settings are easily changed to accommodate other editors.
If you are installing Hugs for the benefit of several different users, then you should probably use a script file that sets appropriate values for the environment variables, and then invokes the interpreter:
#!/bin/sh HUGSFLAGS=/usr/Hugs/lib:/usr/Hugs/libhugs -E"vi +%d %s" +s export HUGSFLAGS exec /usr/local/bin/hugs $*One advantage of this approach is that individual users do not have to worry about setting the environment variables themselves. In addition to the E and P options, other options---such as +s in this example---can be set. It is easy for more advanced users to copy and customize a script like this to suit their own needs.
set HUGSFLAGS=-P\hugs\lib;\hugs\libhugs -E"vi +%%d %%s"The setting for the path assumes that the system has been installed in a top-level hugs directory, and will need to be modified accordingly if a different directory was chosen. In a similar way, the setting for the editor will only work if you have installed the editor program, in this case vi, that it refers to.
For completeness, we should also mention the other environment variables that are used by Hugs: