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

implement env/cwd item for job_start that pass to the environment variables to new process. #1160

Closed
wants to merge 14 commits into
base: master
from

Conversation

Projects
None yet
8 participants
@mattn

mattn commented Oct 12, 2016

Still, this is work in progress. Just only implementation and test.

Closes #1158

TODO: update doc

@mattn

This comment has been minimized.

Show comment
Hide comment
@mattn

mattn Oct 12, 2016

renamed to environ. And add cwd also.

If we need environ(), I have ready to send new PR.

https://gist.github.com/mattn/c37ee015504861284d25a87c6af4c177

mattn commented Oct 12, 2016

renamed to environ. And add cwd also.

If we need environ(), I have ready to send new PR.

https://gist.github.com/mattn/c37ee015504861284d25a87c6af4c177

@mattn

This comment has been minimized.

Show comment
Hide comment
@mattn

mattn Aug 6, 2017

I rebased this PR.

mattn commented Aug 6, 2017

I rebased this PR.

mattn added some commits Aug 6, 2017

@codecov-io

This comment has been minimized.

Show comment
Hide comment
@codecov-io

codecov-io Aug 6, 2017

Codecov Report

Merging #1160 into master will decrease coverage by 0.35%.
The diff coverage is 46.15%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1160      +/-   ##
==========================================
- Coverage   75.09%   74.73%   -0.36%     
==========================================
  Files          76       77       +1     
  Lines      125285   125712     +427     
  Branches        0    28131   +28131     
==========================================
- Hits        94077    93949     -128     
- Misses      31208    31759     +551     
- Partials        0        4       +4
Impacted Files Coverage Δ
src/os_unix.c 52.41% <7.69%> (-4.65%) ⬇️
src/channel.c 83.93% <84.61%> (ø) ⬆️
src/pty.c 55.55% <0%> (-16.67%) ⬇️
src/if_cscope.c 73.94% <0%> (-2.42%) ⬇️
src/libvterm/src/screen.c 73.34% <0%> (-1.3%) ⬇️
src/version.c 79.18% <0%> (-1.12%) ⬇️
src/if_xcmdsrv.c 84.25% <0%> (-0.93%) ⬇️
src/if_perl.xs 85.74% <0%> (-0.67%) ⬇️
src/eval.c 80.32% <0%> (-0.29%) ⬇️
... and 45 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bae5a17...dac8525. Read the comment docs.

codecov-io commented Aug 6, 2017

Codecov Report

Merging #1160 into master will decrease coverage by 0.35%.
The diff coverage is 46.15%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1160      +/-   ##
==========================================
- Coverage   75.09%   74.73%   -0.36%     
==========================================
  Files          76       77       +1     
  Lines      125285   125712     +427     
  Branches        0    28131   +28131     
==========================================
- Hits        94077    93949     -128     
- Misses      31208    31759     +551     
- Partials        0        4       +4
Impacted Files Coverage Δ
src/os_unix.c 52.41% <7.69%> (-4.65%) ⬇️
src/channel.c 83.93% <84.61%> (ø) ⬆️
src/pty.c 55.55% <0%> (-16.67%) ⬇️
src/if_cscope.c 73.94% <0%> (-2.42%) ⬇️
src/libvterm/src/screen.c 73.34% <0%> (-1.3%) ⬇️
src/version.c 79.18% <0%> (-1.12%) ⬇️
src/if_xcmdsrv.c 84.25% <0%> (-0.93%) ⬇️
src/if_perl.xs 85.74% <0%> (-0.67%) ⬇️
src/eval.c 80.32% <0%> (-0.29%) ⬇️
... and 45 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bae5a17...dac8525. Read the comment docs.

@mattn mattn changed the title from implement envs item for job_start that pass to the environment variables to new process. to implement env/cwd item for job_start that pass to the environment variables to new process. Aug 7, 2017

mattn added some commits Aug 9, 2017

@brammool brammool closed this in 05aafed Aug 11, 2017

@mattn mattn deleted the mattn:job-envs branch Aug 12, 2017

@@ -696,6 +696,9 @@ See |job_setoptions()| and |ch_setoptions()|.
"block_write": number only for testing: pretend every other write to stdin
will block
"env": dict environment variables for new process

This comment has been minimized.

@alanhamlett

alanhamlett Oct 4, 2017

Can we add a note for these 2 new options about the version of Vim which these are available?

@alanhamlett

alanhamlett Oct 4, 2017

Can we add a note for these 2 new options about the version of Vim which these are available?

This comment has been minimized.

@chrisbra

chrisbra Oct 4, 2017

Member

you can check with :if v:version > 800 || v:version == 800 && has("patch902")

@chrisbra

chrisbra Oct 4, 2017

Member

you can check with :if v:version > 800 || v:version == 800 && has("patch902")

This comment has been minimized.

@k-takata

k-takata Oct 4, 2017

Member

@chrisbra :if has('patch-8.0.0902') is better, I think.

@alanhamlett Unfortunately, such patch numbers are usually not documented.

@k-takata

k-takata Oct 4, 2017

Member

@chrisbra :if has('patch-8.0.0902') is better, I think.

@alanhamlett Unfortunately, such patch numbers are usually not documented.

adizero pushed a commit to adizero/vim that referenced this pull request May 19, 2018

patch 8.0.0902: cannot specify directory or environment for a job
Problem:    Cannot specify directory or environment for a job.
Solution:   Add the "cwd" and "env" arguments to job options. (Yasuhiro
            Matsumoto, closes vim#1160)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment