Monday, October 19, 2015

Re: system command takes a different environment variable from current shell?

"Karl (Xiangrong) Cai" <xcai@juniper.net> writes:

> I thought this was pretty clear :-): And here are the steps again:
>
> 1) xterm with a login tcsh shell is created. At this time $c is set to
> /volume/current.
> 2) do " setenv c /volumeNew/current". As this time "echo $c" in this
> shell shows new value;
> 3) under vim, ":echo $c" shows new value;

Please provide _all_ the steps. According to these steps you haven't
even started vim. And are you doing the setenv to volumeNew within your
original shell (before starting vim?) or in a :! or system() call?

Also, how is the old value set in the first place? Is it in your cshrc?

> 4) under vim, ":let x = system("echo $c")", and then ":echo $c" shows
> old value.

Are you sure this is :echo $c or is it :echo x?

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: