[ESS] Is there a good way to set shell variables before running S+6?

Terry Jones tc.jones at jones.tc
Tue Nov 30 01:38:23 CET 2004


| Is there a good way to set shell variables before running ESS's S+6
| command?  I don't want to set shell variables and export them
| globally; I want them to apply only to the process from which S+
| starts.

Can you say more about your environment?

If it's some flavor of UNIX, you could try setting the vars on the
command line:

  bash$ echo $FFF

  bash$ FFF=ddd bash
  bash$ echo $FFF
  ddd
  bash$ ^D
  bash$ echo $FFF

Above I set an FFF variable on the command line and it gets exported
to the process I start (another shell). So you could change your
command to start the process to be something like the above, but note
that this will only work if the command is processed by the shell, not
exec'd directly by ESS.

You might also play with setenv inside lisp, e.g., in a hook function.

Sorry not to be more useful, but this is perhaps a start.

Terry




More information about the ESS-help mailing list