Skip to content

Allow to pass an index number with sourced compose set #199

@se7entyse7en

Description

@se7entyse7en

Currently, we need to pass the name of the compose file to set it as active. This may require copy-pasting from the output of sourced compose list.

As an example:

✔  se7entyse7en in ~/Projects/src-d/sourced-ce (master)  $ sourced compose list
https://gist.githubusercontent.com/carlosms/aed2c4b0d59358a563ba4f2f41def6f2/raw/1148b6aff24387dd67d5b0c7b05ba1ea8b78a9e2/docker-compose.yml
* master

In this case I'd need to run:

sourced compose set https://gist.githubusercontent.com/carlosms/aed2c4b0d59358a563ba4f2f41def6f2/raw/1148b6aff24387dd67d5b0c7b05ba1ea8b78a9e2/docker-compose.yml

It would be handy if the output of list is:

✔  se7entyse7en in ~/Projects/src-d/sourced-ce (master)  $ sourced compose list
[1] https://gist.githubusercontent.com/carlosms/aed2c4b0d59358a563ba4f2f41def6f2/raw/1148b6aff24387dd67d5b0c7b05ba1ea8b78a9e2/docker-compose.yml
[2] * master

so that I can then simply run:

sourced compose set 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions