crazyfactory / docker-project-cli

MIT License
4 stars 1 forks source link

Improve commands: alias, chain, reuse/recall #28

Closed adhocore closed 6 years ago

adhocore commented 6 years ago

Closes #21 Closes #24 Closes #25

Given below configuration:

{
  "actions": {
    "multiple-cmd": {
      "command": ["echo multiple command as array", "@nested-cmd arg1 arg2"]
    },
    "nested-cmd": {
      "command": ["echo nested command %args%", "@deepnested-cmd --opt1 val1 --opt2 val2"]
    },
    "deepnested-cmd": {
      "command": ["echo deep nested command %args%"]
    },
    "host-cmd": {
      "service": "@host",
      "command": "docker-compose version"
    }
  }
}

when dopr multiple-cmd is run, it yields:

multiple command as array
nested command arg1 arg2
deep nested command --opt1 val1 --opt2 val2
docker-compose version 1.10.0, build 4bd6f1a
docker-py version: 2.0.1
CPython version: 2.7.9
OpenSSL version: OpenSSL 1.0.1t  3 May 2016