Hi, thanks for this amazing project,
I've been searcing around the documentation, but I can't find an equivalence command for
HTTP_PROXY=myproxy curl www.google.com
With bash, I have an alias proxy="http_proxy=myproxy https_proxy=myproxy ", so that I can use proxy when I need to, e.g. proxy curl www.google.com. Is it possible with xonsh?
Current working attempt
def proxy(args):
def impl():
$http_proxy='....'
$https_proxy=''....'
return args
$[@(impl())]
aliases['proxy'] = proxy
# remove helper functions
del proxy
Hey @roxma -- you can take a look here for how to use the swap method on the env: http://xon.sh/bash_to_xsh.html?highlight=swap
You can also use the env command,
env HTTP_PROXY='....' mycommand
Thanks
Also, I'd happily welcome any PRs that add support for this, though I think we'd probably want the syntax $HTTP_PROXY='....' mycommand
I'd be happy with PRs to that effect with considerable test coverage.