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

cmd.setenv has misleading name #136

Closed
chaoflow opened this issue Jul 1, 2014 · 5 comments
Closed

cmd.setenv has misleading name #136

chaoflow opened this issue Jul 1, 2014 · 5 comments

Comments

@chaoflow
Copy link
Contributor

chaoflow commented Jul 1, 2014

setenv sounds like it sets the environment for cmd wheres it returns a new bound command with the environment set.

This does not set the environment of cmd:

import plumb.local
cmd = local['cmd']
cmd.setenv(FOO="foo")

Do you see a way to "fix" this? A linguistic hack would be not to see "set" as a verb...

@tomerfiliba
Copy link
Owner

with_env?
ls2 = ls.with_env(FOO="foo")

donno. but i dont' think it's that common to deserve attention.

-tomer


Tomer Filiba
tomerfiliba.com http://www.facebook.com/tomerfiliba
http://il.linkedin.com/in/tomerfiliba

On Tue, Jul 1, 2014 at 5:05 PM, Florian Friesdorf notifications@github.com
wrote:

setenv sounds like it sets the environment for cmd wheres it returns a
new bound command with the environment set.

This does not set the environment of cmd:

import plumb.local
cmd = local['cmd']
cmd.setenv(FOO="foo")

Do you see a way to "fix" this? A linguistic hack would be not to see
"set" as a verb...


Reply to this email directly or view it on GitHub
#136.

@AntoineD
Copy link
Contributor

AntoineD commented Jul 7, 2014

I also got bitten by this misleading, and the doc does not say that a new command is returned.

@tomerfiliba
Copy link
Owner

@chaoflow, @AntoineD - feel free to submit a pull request that updates the docs and/or provides a better name for it. with_env() or modified_env() sound good to me, but it's really a matter of taste.

@AntoineD
Copy link
Contributor

I'll submit a PR

AntoineD pushed a commit to AntoineD/plumbum that referenced this issue Aug 7, 2014
tomerfiliba added a commit that referenced this issue Aug 7, 2014
@tomerfiliba
Copy link
Owner

closed by #143

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