Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacVim messes up shell environment #22

Closed
douglasdrumond opened this issue May 4, 2015 · 2 comments
Closed

MacVim messes up shell environment #22

douglasdrumond opened this issue May 4, 2015 · 2 comments

Comments

@douglasdrumond
Copy link
Member

From @GoogleCodeExporter on March 16, 2015 9:26

MacVim adds some variables to the environment with a potentially different 
value than the existing one. For example ":!printenv" in MacVim shows me the 
following for my PATH:

PATH=/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin
:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/MacGPG2/bin:/usr/texbin

But a few lines below the following appears:

PATH=/usr/bin:/bin:/usr/sbin:/sbin

Either definition might be picked up depending on the subshell. If I do ":!zsh 
-c 'echo $PATH'", I get the first definition. If I do ":!sh -c 'echo $PATH'" 
instead, I get the second definition.

This is a problem for me because I am using xelatex which tries to execute 
another program in a shell which picks up the wrong PATH definition and cannot 
find the program anymore.

Surprisingly, it works fine (with just a single PATH definition in the 
environment) if I start MacVim with the mvim command from my interactive zsh.

I am using:
MacVim 7.4 (2013 Aug 10, compiled Nov 16 2014 19:08:01), Included patches: 1-258
zsh 5.0.7 (x86_64-apple-darwin14.0.0)
sh is GNU bash, version 3.2.53(1)-release (x86_64-apple-darwin14)

Original issue reported on code.google.com by j...@hyper-world.de on 5 Jan 2015 at 1:38

Copied from original issue: #523

@douglasdrumond
Copy link
Member Author

From @GoogleCodeExporter on March 16, 2015 9:26

See also https://discussions.apple.com/thread/6751474?start=15&tstart=0

Original comment by j...@hyper-world.de on 2 Feb 2015 at 9:53

@eirnym
Copy link
Contributor

eirnym commented May 30, 2015

I have same variables with this commands as I see from Terminal (I use zsh for login shell), and there's no mess with environment variables. I've tried run from console (mvim), from Spotlight Search, and using Launchpad.

In this situation you can:

  • use script which controls variables you need
  • check your shell scripts (include login one) to see where is bug
  • execute your program only from console

MacVim: Snapshot 76
OS X: 10.10.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants