You could set env variables from passing an argument to fabric function from
command line,

$ fab sometask:foo,baz,keyword=kwbar

sometask(first, second, keyword='')
    env.first = first
    env.second = second
    env.keywork = keyword

On Wed, Oct 5, 2011 at 10:36 PM, Oivvio Polite <[email protected]> wrote:

> I'd like to use env to store some more options provided on the command
> line so that for instance
>
> $ fabric --foo bar sometask
>
> would give result  in sometask being run with  env.foo == "bar"
>
> or even
>
> $ fabric --extraenvs foo:bar,baz:qux sometask
>
> would  result  in sometask being run with  env.foo == "bar" and
> env.bar == "qux"
>
> Is there anyway of doing something along those lines with the way that
> fabric works a the moment or would that have to be added?
>
> oivvio
>
> --
> http://liberationtech.net
>
> _______________________________________________
> Fab-user mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/fab-user
>
_______________________________________________
Fab-user mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/fab-user

Reply via email to