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

Would like an empty form of 'bake' that allows changing arguments #291

Closed
virtuald opened this issue Dec 15, 2015 · 2 comments
Closed

Would like an empty form of 'bake' that allows changing arguments #291

virtuald opened this issue Dec 15, 2015 · 2 comments

Comments

@virtuald
Copy link

Here's what I would like to be able to do:

redir = sh.bake(_out=something)
redir.cat('file')  # output goes to 'something'

Currently bake seems to require a subcommand, which is undesirable for general overriding. Also, the args contextmanager is very similar to what I want -- but it overrides globally, which is not what I want.

@amoffat
Copy link
Owner

amoffat commented Dec 16, 2015

I think you are looking for this #271 which will be in the 1.2 release. It would let you do...

redir = sh(_out=something)
from redir import cat as my_cat
my_cat('file')

@virtuald
Copy link
Author

That is precisely what I would be looking for.

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

2 participants