[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inferior process mystery

From: John Wiegley
Subject: Re: Inferior process mystery
Date: Wed, 25 Apr 2012 21:21:26 -0500
User-agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/23.4 (darwin)

>>>>> Ivan Andrus <address@hidden> writes:

> Since you're on a Mac, GUI applications don't inherit from your shell.
> Instead you should set environment variables in ~/.MacOSX/environment.plist,
> or see [1] for a number of other ways to set them and the different problems
> they have.

I use ~/.MacOSX/environment for _all_ environment variables, and then put this
in my .zshrc:

  if [ -x $HOME/bin/shell-args ]; then
    eval `$HOME/bin/shell-args`

And that script does this:

  open(ARGS, "~/.MacOSX/environment.plist") || die;
  while (<ARGS>) {
      print "export $1" if /<key>(.+?)<\/key>/;
      print "=\"$1\"\n" if /<string>(.+?)<\/string>/;

That way, I only have to consider a single place.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]